Adjust transition time based on miss/hit

This commit is contained in:
Dean Herbert 2023-10-06 19:34:38 +09:00
parent 3f2a00d90d
commit d87ab9c82d
No known key found for this signature in database
1 changed files with 4 additions and 2 deletions

View File

@ -145,9 +145,11 @@ protected override void LoadComplete()
if (v.NewValue >= GlowBarValue) if (v.NewValue >= GlowBarValue)
finishMissDisplay(); finishMissDisplay();
this.TransformTo(nameof(HealthBarValue), v.NewValue, 300, Easing.OutQuint); double time = v.NewValue > GlowBarValue ? 500 : 250;
this.TransformTo(nameof(HealthBarValue), v.NewValue, time, Easing.OutQuint);
if (resetMissBarDelegate == null) if (resetMissBarDelegate == null)
this.TransformTo(nameof(GlowBarValue), v.NewValue, 300, Easing.OutQuint); this.TransformTo(nameof(GlowBarValue), v.NewValue, time, Easing.OutQuint);
}, true); }, true);
BarLength.BindValueChanged(l => Width = l.NewValue, true); BarLength.BindValueChanged(l => Width = l.NewValue, true);