replace if check with variable decl

This commit is contained in:
mcendu 2020-02-09 13:35:36 +08:00
parent 83c67dc155
commit c9520b299a
No known key found for this signature in database
GPG Key ID: FBCD5D45163D6364

View File

@ -36,11 +36,10 @@ namespace osu.Game.Rulesets.Osu.Mods
spinner.Disc.Trackable = false;
spinner.Disc.OnUpdate += d =>
{
if (d is SpinnerDisc s)
{
if (s.Valid)
s.Rotate(180 / MathF.PI * frameDelay / 40);
}
var s = d as SpinnerDisc;
if (s.Valid)
s.Rotate(180 / MathF.PI * frameDelay / 40);
};
}
}