mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Move passing transforms to post-load for safety
This commit is contained in:
parent
3565fe1cb2
commit
5902cd81a4
@ -101,16 +101,8 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
||||
|
||||
passing = value;
|
||||
|
||||
if (passing)
|
||||
{
|
||||
passingSprite.Show();
|
||||
failingSprite.FadeOut(200);
|
||||
}
|
||||
else
|
||||
{
|
||||
failingSprite.FadeIn(200);
|
||||
passingSprite.Delay(200).FadeOut();
|
||||
}
|
||||
if (IsLoaded)
|
||||
updatePassing();
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,6 +119,8 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
||||
passingSprite = new Sprite { Texture = skin.GetTexture("taiko-slider") },
|
||||
failingSprite = new Sprite { Texture = skin.GetTexture("taiko-slider-fail"), Alpha = 0 },
|
||||
};
|
||||
|
||||
updatePassing();
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
@ -136,6 +130,20 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
||||
foreach (var c in InternalChildren)
|
||||
c.Scale = new Vector2(DrawHeight / c.Height);
|
||||
}
|
||||
|
||||
private void updatePassing()
|
||||
{
|
||||
if (passing)
|
||||
{
|
||||
passingSprite.Show();
|
||||
failingSprite.FadeOut(200);
|
||||
}
|
||||
else
|
||||
{
|
||||
failingSprite.FadeIn(200);
|
||||
passingSprite.Delay(200).FadeOut();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user