mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 07:42:55 +08:00
Fix transition out of clear state
This commit is contained in:
parent
5cfc05e12a
commit
db4c8b2ba5
@ -144,15 +144,16 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
assertStateAfterResult(new JudgementResult(new Hit(), new TaikoJudgement()) { Type = HitResult.Good }, TaikoMascotAnimationState.Clear);
|
assertStateAfterResult(new JudgementResult(new Hit(), new TaikoJudgement()) { Type = HitResult.Good }, TaikoMascotAnimationState.Clear);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase(true)]
|
[TestCase(true, TaikoMascotAnimationState.Kiai)]
|
||||||
[TestCase(false)]
|
[TestCase(false, TaikoMascotAnimationState.Idle)]
|
||||||
public void TestClearStateOnClearedSwell(bool kiai)
|
public void TestClearStateOnClearedSwell(bool kiai, TaikoMascotAnimationState expectedStateAfterClear)
|
||||||
{
|
{
|
||||||
AddStep("set beatmap", () => setBeatmap(kiai));
|
AddStep("set beatmap", () => setBeatmap(kiai));
|
||||||
|
|
||||||
createDrawableRuleset();
|
createDrawableRuleset();
|
||||||
|
|
||||||
assertStateAfterResult(new JudgementResult(new Swell(), new TaikoSwellJudgement()) { Type = HitResult.Great }, TaikoMascotAnimationState.Clear);
|
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)
|
private void setBeatmap(bool kiai = false)
|
||||||
|
@ -61,7 +61,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
if (triggerComboClear(result) || triggerSwellClear(result))
|
if (triggerComboClear(result) || triggerSwellClear(result))
|
||||||
{
|
{
|
||||||
state.Value = TaikoMascotAnimationState.Clear;
|
state.Value = TaikoMascotAnimationState.Clear;
|
||||||
return;
|
// never play fail immediately after clear.
|
||||||
|
lastObjectHit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result.Judgement.AffectsCombo)
|
if (!result.Judgement.AffectsCombo)
|
||||||
|
Loading…
Reference in New Issue
Block a user