mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 22:22:54 +08:00
Fix mascot getting stuck in clear state on rewind
This commit is contained in:
parent
0933217389
commit
9ba1a8af88
@ -96,9 +96,9 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
|
||||
private TaikoMascotAnimationState getNextState()
|
||||
{
|
||||
// don't change state if current animation is playing
|
||||
// (used for clear state - others are manually animated on new beats)
|
||||
if (currentAnimation != null && !currentAnimation.Completed)
|
||||
// don't change state if current animation is still playing (and we haven't rewound before it).
|
||||
// used for clear state - others are manually animated on new beats.
|
||||
if (currentAnimation?.Completed == false && currentAnimation.DisplayTime <= Time.Current)
|
||||
return State.Value;
|
||||
|
||||
if (!lastObjectHit)
|
||||
|
@ -20,6 +20,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
|
||||
private int currentFrame;
|
||||
|
||||
public double DisplayTime;
|
||||
|
||||
public TaikoMascotAnimation(TaikoMascotAnimationState state)
|
||||
{
|
||||
InternalChild = textureAnimation = createTextureAnimation(state).With(animation =>
|
||||
@ -40,6 +42,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
DisplayTime = Time.Current;
|
||||
textureAnimation.Seek(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user