mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 04:03:22 +08:00
Fix ArgonHealthDisplay
not displaying miss correctly during initial transition
This commit is contained in:
parent
4d82a55594
commit
629e64d50a
@ -204,6 +204,13 @@ namespace osu.Game.Screens.Play.HUD
|
||||
glowBar.Alpha = (float)Interpolation.DampContinuously(glowBar.Alpha, GlowBarValue > 0 ? 1 : 0, 40, Time.Elapsed);
|
||||
}
|
||||
|
||||
protected override void FinishInitialAnimation(double value)
|
||||
{
|
||||
base.FinishInitialAnimation(value);
|
||||
this.TransformTo(nameof(HealthBarValue), value, 500, Easing.OutQuint);
|
||||
this.TransformTo(nameof(GlowBarValue), value, 250, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override void Flash()
|
||||
{
|
||||
base.Flash();
|
||||
|
@ -58,7 +58,9 @@ namespace osu.Game.Screens.Play.HUD
|
||||
health = HealthProcessor.Health.GetBoundCopy();
|
||||
health.BindValueChanged(h =>
|
||||
{
|
||||
finishInitialAnimation();
|
||||
if (initialIncrease != null)
|
||||
FinishInitialAnimation(h.OldValue);
|
||||
|
||||
Current.Value = h.NewValue;
|
||||
});
|
||||
|
||||
@ -90,16 +92,16 @@ namespace osu.Game.Screens.Play.HUD
|
||||
Scheduler.AddOnce(Flash);
|
||||
|
||||
if (newValue >= health.Value)
|
||||
finishInitialAnimation();
|
||||
FinishInitialAnimation(health.Value);
|
||||
}, increase_delay, true);
|
||||
}
|
||||
|
||||
private void finishInitialAnimation()
|
||||
protected virtual void FinishInitialAnimation(double value)
|
||||
{
|
||||
if (initialIncrease == null)
|
||||
return;
|
||||
|
||||
initialIncrease?.Cancel();
|
||||
initialIncrease.Cancel();
|
||||
initialIncrease = null;
|
||||
|
||||
// aside from the repeating `initialIncrease` scheduled task,
|
||||
|
Loading…
Reference in New Issue
Block a user