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

return to use if for casting

This commit is contained in:
mcendu 2020-02-09 14:56:47 +08:00
parent 596f4f7d2e
commit e78d94d469
No known key found for this signature in database
GPG Key ID: FBCD5D45163D6364

View File

@ -33,9 +33,7 @@ namespace osu.Game.Rulesets.Osu.Mods
spinner.Disc.Enabled = false; spinner.Disc.Enabled = false;
spinner.Disc.OnUpdate += d => spinner.Disc.OnUpdate += d =>
{ {
var s = d as SpinnerDisc; if (d is SpinnerDisc s && s.Valid)
if (s.Valid)
s.Rotate(180 / MathF.PI * (float)s.Clock.ElapsedFrameTime / 40); s.Rotate(180 / MathF.PI * (float)s.Clock.ElapsedFrameTime / 40);
}; };
} }