1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 21:27:24 +08:00

Revert back to bool for application

This commit is contained in:
Dean Herbert 2020-07-21 19:48:44 +09:00
parent 3aa0f82c9d
commit 1560e1786a
2 changed files with 4 additions and 7 deletions

View File

@ -201,7 +201,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
// Trigger a miss result for remaining ticks to avoid infinite gameplay.
foreach (var tick in ticks.Where(t => !t.IsHit))
tick.TriggerResult(HitResult.Miss);
tick.TriggerResult(false);
ApplyResult(r =>
{
@ -267,7 +267,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
// tick may be null if we've hit the spin limit.
if (tick != null)
{
tick.TriggerResult(HitResult.Great);
tick.TriggerResult(true);
if (tick is DrawableSpinnerBonusTick)
bonusDisplay.SetBonusCount(spins - Spinner.SpinsRequired);
}

View File

@ -17,10 +17,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
/// <summary>
/// Apply a judgement result.
/// </summary>
/// <param name="result">Whether to apply a <see cref="HitResult.Great"/> result, <see cref="HitResult.Miss"/> otherwise.</param>
internal void TriggerResult(HitResult result)
{
ApplyResult(r => r.Type = result);
}
/// <param name="hit">Whether this tick was reached.</param>
internal void TriggerResult(bool hit) => ApplyResult(r => r.Type = hit ? r.Judgement.MaxResult : HitResult.Miss);
}
}