mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Merge pull request #25673 from frenzibyte/fix-argon-initial-display
Fix `ArgonHealthDisplay` not displaying miss correctly during initial transition
This commit is contained in:
commit
76c4931f3a
@ -212,6 +212,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