mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 21:53:22 +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()
|
||||
{
|
||||
boxes.Alpha = (float)Interpolation.ValueAt(Math.Clamp(Clock.ElapsedFrameTime, 0, fade_time), boxes.Alpha,
|
||||
Math.Clamp(max_alpha * (1 - Current.Value / LowHealthThreshold), 0, max_alpha), 0, fade_time, Easing.Out);
|
||||
double target = Math.Clamp(max_alpha * (1 - Current.Value / LowHealthThreshold), 0, max_alpha);
|
||||
|
||||
boxes.Alpha = (float)Interpolation.Lerp(boxes.Alpha, target, Clock.ElapsedFrameTime * 0.01f);
|
||||
|
||||
base.Update();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user