mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 04:12:55 +08:00
Use Lerp instead of ValueAt
This commit is contained in:
parent
c44957db3f
commit
5a78e74470
@ -89,8 +89,9 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
boxes.Alpha = (float)Interpolation.ValueAt(Math.Clamp(Clock.ElapsedFrameTime, 0, fade_time), boxes.Alpha,
|
double target = Math.Clamp(max_alpha * (1 - Current.Value / LowHealthThreshold), 0, max_alpha);
|
||||||
Math.Clamp(max_alpha * (1 - Current.Value / LowHealthThreshold), 0, max_alpha), 0, fade_time, Easing.Out);
|
|
||||||
|
boxes.Alpha = (float)Interpolation.Lerp(boxes.Alpha, target, Clock.ElapsedFrameTime * 0.01f);
|
||||||
|
|
||||||
base.Update();
|
base.Update();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user