mirror of
https://github.com/ppy/osu
synced 2025-03-11 05:49:12 +00:00
Fix so it reacts to PathVersion with Scheduler
This commit is contained in:
parent
e1186080b8
commit
fca9b1f536
@ -244,7 +244,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
else if (slidingSample.IsPlaying)
|
else if (slidingSample.IsPlaying)
|
||||||
slidingSample.Stop();
|
slidingSample.Stop();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void UpdateAfterChildren()
|
||||||
|
{
|
||||||
|
base.UpdateAfterChildren();
|
||||||
|
|
||||||
|
// It's important that this is done in UpdateAfterChildren so that the SliderBody has a chance to update its Size and PathOffset on Update.
|
||||||
double completionProgress = Math.Clamp((Time.Current - HitObject.StartTime) / HitObject.Duration, 0, 1);
|
double completionProgress = Math.Clamp((Time.Current - HitObject.StartTime) / HitObject.Duration, 0, 1);
|
||||||
|
|
||||||
Ball.UpdateProgress(completionProgress);
|
Ball.UpdateProgress(completionProgress);
|
||||||
|
@ -18,6 +18,8 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
|||||||
|
|
||||||
protected IBindable<Color4> AccentColourBindable { get; private set; } = null!;
|
protected IBindable<Color4> AccentColourBindable { get; private set; } = null!;
|
||||||
|
|
||||||
|
private IBindable<int> pathVersion = null!;
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
private OsuRulesetConfigManager? config { get; set; }
|
private OsuRulesetConfigManager? config { get; set; }
|
||||||
|
|
||||||
@ -31,8 +33,8 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
|||||||
ScaleBindable = drawableSlider.ScaleBindable.GetBoundCopy();
|
ScaleBindable = drawableSlider.ScaleBindable.GetBoundCopy();
|
||||||
ScaleBindable.BindValueChanged(scale => PathRadius = OsuHitObject.OBJECT_RADIUS * scale.NewValue, true);
|
ScaleBindable.BindValueChanged(scale => PathRadius = OsuHitObject.OBJECT_RADIUS * scale.NewValue, true);
|
||||||
|
|
||||||
drawableObject.DefaultsApplied += _ => Refresh();
|
pathVersion = drawableSlider.PathVersion.GetBoundCopy();
|
||||||
drawableObject.HitObjectApplied += _ => Refresh();
|
pathVersion.BindValueChanged(_ => Scheduler.AddOnce(Refresh));
|
||||||
|
|
||||||
AccentColourBindable = drawableObject.AccentColour.GetBoundCopy();
|
AccentColourBindable = drawableObject.AccentColour.GetBoundCopy();
|
||||||
AccentColourBindable.BindValueChanged(accent => AccentColour = GetBodyAccentColour(skin, accent.NewValue), true);
|
AccentColourBindable.BindValueChanged(accent => AccentColour = GetBodyAccentColour(skin, accent.NewValue), true);
|
||||||
|
Loading…
Reference in New Issue
Block a user