1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:42:54 +08:00

Replace if pattern-matching check with switch cases instead

This commit is contained in:
Salman Ahmed 2021-06-21 03:37:49 +03:00
parent c3217fd8b1
commit 72155a7c52

View File

@ -53,11 +53,14 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
private void updateStateTransforms(DrawableHitObject drawableHitObject, ArmedState state)
{
if (!(drawableHitObject is DrawableSpinner spinner))
return;
switch (drawableHitObject)
{
case DrawableSpinner spinner:
using (BeginAbsoluteSequence(spinner.HitObject.StartTime))
approachCircle?.ScaleTo(0.1f, spinner.HitObject.Duration);
using (BeginAbsoluteSequence(spinner.HitObject.StartTime))
approachCircle?.ScaleTo(0.1f, spinner.HitObject.Duration);
break;
}
}
}
}