mirror of
https://github.com/ppy/osu
synced 2024-12-16 03:45:46 +00:00
Replace object pattern match with simple conditional
This commit is contained in:
parent
1f0620ffd4
commit
2ddfd79923
@ -506,19 +506,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
|
|
||||||
Result.TimeOffset = Math.Min(HitObject.HitWindows.WindowFor(HitResult.Miss), Time.Current - endTime);
|
Result.TimeOffset = Math.Min(HitObject.HitWindows.WindowFor(HitResult.Miss), Time.Current - endTime);
|
||||||
|
|
||||||
switch (Result.Type)
|
if (Result.HasResult)
|
||||||
{
|
updateState(Result.IsHit ? ArmedState.Hit : ArmedState.Miss);
|
||||||
case HitResult.None:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case { } result when !result.IsHit():
|
|
||||||
updateState(ArmedState.Miss);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
updateState(ArmedState.Hit);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
OnNewResult?.Invoke(this, Result);
|
OnNewResult?.Invoke(this, Result);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user