Replace object pattern match with simple conditional

This commit is contained in:
Bartłomiej Dach 2020-10-03 08:09:10 +02:00
parent 1f0620ffd4
commit 2ddfd79923

View File

@ -506,19 +506,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
Result.TimeOffset = Math.Min(HitObject.HitWindows.WindowFor(HitResult.Miss), Time.Current - endTime);
switch (Result.Type)
{
case HitResult.None:
break;
case { } result when !result.IsHit():
updateState(ArmedState.Miss);
break;
default:
updateState(ArmedState.Hit);
break;
}
if (Result.HasResult)
updateState(Result.IsHit ? ArmedState.Hit : ArmedState.Miss);
OnNewResult?.Invoke(this, Result);
}