mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +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()
|
private TaikoMascotAnimationState getNextState()
|
||||||
{
|
{
|
||||||
// don't change state if current animation is playing
|
// 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)
|
// used for clear state - others are manually animated on new beats.
|
||||||
if (currentAnimation != null && !currentAnimation.Completed)
|
if (currentAnimation?.Completed == false && currentAnimation.DisplayTime <= Time.Current)
|
||||||
return State.Value;
|
return State.Value;
|
||||||
|
|
||||||
if (!lastObjectHit)
|
if (!lastObjectHit)
|
||||||
|
@ -20,6 +20,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
|
|
||||||
private int currentFrame;
|
private int currentFrame;
|
||||||
|
|
||||||
|
public double DisplayTime;
|
||||||
|
|
||||||
public TaikoMascotAnimation(TaikoMascotAnimationState state)
|
public TaikoMascotAnimation(TaikoMascotAnimationState state)
|
||||||
{
|
{
|
||||||
InternalChild = textureAnimation = createTextureAnimation(state).With(animation =>
|
InternalChild = textureAnimation = createTextureAnimation(state).With(animation =>
|
||||||
@ -40,6 +42,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
public override void Show()
|
public override void Show()
|
||||||
{
|
{
|
||||||
base.Show();
|
base.Show();
|
||||||
|
DisplayTime = Time.Current;
|
||||||
textureAnimation.Seek(0);
|
textureAnimation.Seek(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user