Fix transition out of clear state

This commit is contained in:
Bartłomiej Dach 2020-04-30 22:16:25 +02:00
parent 5cfc05e12a
commit db4c8b2ba5
2 changed files with 6 additions and 4 deletions

View File

@ -144,15 +144,16 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
assertStateAfterResult(new JudgementResult(new Hit(), new TaikoJudgement()) { Type = HitResult.Good }, TaikoMascotAnimationState.Clear);
}
[TestCase(true)]
[TestCase(false)]
public void TestClearStateOnClearedSwell(bool kiai)
[TestCase(true, TaikoMascotAnimationState.Kiai)]
[TestCase(false, TaikoMascotAnimationState.Idle)]
public void TestClearStateOnClearedSwell(bool kiai, TaikoMascotAnimationState expectedStateAfterClear)
{
AddStep("set beatmap", () => setBeatmap(kiai));
createDrawableRuleset();
assertStateAfterResult(new JudgementResult(new Swell(), new TaikoSwellJudgement()) { Type = HitResult.Great }, TaikoMascotAnimationState.Clear);
AddUntilStep($"state reverts to {expectedStateAfterClear.ToString().ToLower()}", () => allMascotsIn(expectedStateAfterClear));
}
private void setBeatmap(bool kiai = false)

View File

@ -61,7 +61,8 @@ namespace osu.Game.Rulesets.Taiko.UI
if (triggerComboClear(result) || triggerSwellClear(result))
{
state.Value = TaikoMascotAnimationState.Clear;
return;
// never play fail immediately after clear.
lastObjectHit = true;
}
if (!result.Judgement.AffectsCombo)