1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:52:57 +08:00

Use switch instead of or

This commit is contained in:
Dean Herbert 2022-07-21 23:16:28 +09:00
parent 23fd514ca3
commit 726042d9ec

View File

@ -25,13 +25,26 @@ namespace osu.Game.Rulesets.Osu.Skinning
switch (state)
{
case ArmedState.Hit:
if (drawableObject is DrawableSliderTick or DrawableSliderRepeat)
OnSliderTick();
switch (drawableObject)
{
case DrawableSliderTick:
case DrawableSliderRepeat:
OnSliderTick();
break;
}
break;
case ArmedState.Miss:
if (drawableObject is DrawableSliderTail or DrawableSliderTick or DrawableSliderRepeat)
OnSliderBreak();
switch (drawableObject)
{
case DrawableSliderTail:
case DrawableSliderTick:
case DrawableSliderRepeat:
OnSliderBreak();
break;
}
break;
}
}