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

Ensure correct initial state

This commit is contained in:
Bartłomiej Dach 2020-04-30 22:03:39 +02:00
parent 22fde8d2a0
commit 5cfc05e12a
2 changed files with 9 additions and 1 deletions

View File

@ -62,6 +62,14 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
AddStep("fail state", () => SetContents(() => new TaikoMascotAnimation(TaikoMascotAnimationState.Fail)));
}
[Test]
public void TestInitialState()
{
AddStep("create mascot", () => SetContents(() => new DrawableTaikoMascot()));
AddAssert("mascot initially idle", () => allMascotsIn(TaikoMascotAnimationState.Idle));
}
[Test]
public void TestClearStateTransition()
{

View File

@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Taiko.UI
private readonly Dictionary<TaikoMascotAnimationState, TaikoMascotAnimation> animations;
private TaikoMascotAnimation currentAnimation;
private bool lastObjectHit;
private bool lastObjectHit = true;
private bool kiaiMode;
public DrawableTaikoMascot(TaikoMascotAnimationState startingState = TaikoMascotAnimationState.Idle)