mirror of
https://github.com/ppy/osu
synced 2024-12-23 23:33:36 +00:00
Simplify implementation
This commit is contained in:
parent
2696620d12
commit
824d671cce
@ -122,14 +122,9 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
||||
private void updateSpmAlpha()
|
||||
{
|
||||
if (drawableSpinner.Result?.TimeStarted is double startTime)
|
||||
{
|
||||
double timeOffset = Math.Clamp(Clock.CurrentTime, startTime, startTime + drawableSpinner.HitObject.TimeFadeIn) - startTime;
|
||||
spmContainer.Alpha = (float)(timeOffset / drawableSpinner.HitObject.TimeFadeIn);
|
||||
}
|
||||
spmContainer.Alpha = (float)Math.Clamp((Clock.CurrentTime - startTime) / drawableSpinner.HitObject.TimeFadeIn, 0, 1);
|
||||
else
|
||||
{
|
||||
spmContainer.Alpha = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,14 +128,9 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
private void updateSpmAlpha()
|
||||
{
|
||||
if (drawableSpinner.Result?.TimeStarted is double startTime)
|
||||
{
|
||||
double timeOffset = Math.Clamp(Clock.CurrentTime, startTime, startTime + drawableSpinner.HitObject.TimeFadeIn) - startTime;
|
||||
spmContainer.Alpha = (float)(timeOffset / drawableSpinner.HitObject.TimeFadeIn);
|
||||
}
|
||||
spmContainer.Alpha = (float)Math.Clamp((Clock.CurrentTime - startTime) / drawableSpinner.HitObject.TimeFadeIn, 0, 1);
|
||||
else
|
||||
{
|
||||
spmContainer.Alpha = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user