mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Switch to strong sprite exactly once
This commit is contained in:
parent
0900661b23
commit
f6f267a43a
@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
||||
|
||||
private DrawableHit hit;
|
||||
private DrawableStrongNestedHit nestedStrongHit;
|
||||
private bool switchedToStrongSprite;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new legacy hit explosion.
|
||||
@ -84,16 +85,17 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (shouldSwitchToStrongSprite() && strongSprite != null)
|
||||
if (shouldSwitchToStrongSprite() && !switchedToStrongSprite)
|
||||
{
|
||||
sprite.FadeOut(50, Easing.OutQuint);
|
||||
strongSprite.FadeIn(50, Easing.OutQuint);
|
||||
switchedToStrongSprite = true;
|
||||
}
|
||||
}
|
||||
|
||||
private bool shouldSwitchToStrongSprite()
|
||||
{
|
||||
if (hit == null || nestedStrongHit == null)
|
||||
if (hit == null || nestedStrongHit == null || strongSprite == null)
|
||||
return false;
|
||||
|
||||
return nestedStrongHit.IsHit;
|
||||
|
Loading…
Reference in New Issue
Block a user