mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:42:56 +08:00
Fix cake errors
This commit is contained in:
parent
1f48378ce7
commit
211bff6a8f
@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
|
||||
private readonly Drawable headPiece;
|
||||
|
||||
private readonly Bindable<int> Snap = new Bindable<int>();
|
||||
private readonly Bindable<int> snap = new Bindable<int>();
|
||||
|
||||
public DrawableNote(Note hitObject)
|
||||
: base(hitObject)
|
||||
@ -61,9 +61,9 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
{
|
||||
config?.BindWith(ManiaRulesetSetting.ColourCodedNotes, configColourCodedNotes);
|
||||
|
||||
HitObject.StartTimeBindable.BindValueChanged(_ => Snap.Value = snapFinder.FindSnap(HitObject), true);
|
||||
HitObject.StartTimeBindable.BindValueChanged(_ => snap.Value = snapFinder.FindSnap(HitObject), true);
|
||||
|
||||
Snap.BindValueChanged(_ => updateSnapColour(), true);
|
||||
snap.BindValueChanged(_ => updateSnapColour(), true);
|
||||
configColourCodedNotes.BindValueChanged(_ => updateSnapColour());
|
||||
}
|
||||
}
|
||||
@ -106,12 +106,12 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
|
||||
public virtual void OnReleased(ManiaAction action)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSnapColour()
|
||||
{
|
||||
Colour = configColourCodedNotes.Value
|
||||
? (ColourInfo)BindableBeatDivisor.GetColourFor(Snap.Value, colours)
|
||||
? (ColourInfo)BindableBeatDivisor.GetColourFor(snap.Value, colours)
|
||||
: (ColourInfo)Colour4.White;
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
this.beatmap = beatmap;
|
||||
}
|
||||
|
||||
private readonly static int[] snaps = { 1, 2, 3, 4, 6, 8, 12, 16 };
|
||||
private static readonly int[] snaps = { 1, 2, 3, 4, 6, 8, 12, 16 };
|
||||
|
||||
/// <summary>
|
||||
/// Finds the lowest beat divisor that the given HitObject aligns to.
|
||||
@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
|
||||
foreach (var snap in snaps)
|
||||
{
|
||||
if (almostDivisibleBy(snapResult, currentTimingPoint.BeatLength / (double)snap))
|
||||
if (almostDivisibleBy(snapResult, currentTimingPoint.BeatLength / snap))
|
||||
return snap;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user