1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00

Limit state changes to apply only once.

This commit is contained in:
Dean Herbert 2016-11-02 12:31:51 +09:00
parent 8d4e7038b3
commit fbaae94ba4
2 changed files with 9 additions and 0 deletions

View File

@ -31,6 +31,7 @@ namespace osu.Game.Beatmaps.Objects
set
{
if (state == value) return;
state = value;
UpdateState(state);

View File

@ -70,6 +70,14 @@ namespace osu.Game.Beatmaps.Objects.Osu.Drawable
approachCircle.Texture = game.Textures.Get(@"Play/osu/approachcircle@2x");
}
protected override void LoadComplete()
{
base.LoadComplete();
//force application of the state that was set before we loaded.
UpdateState(State);
}
protected override void UpdateState(ArmedState state)
{
if (!IsLoaded) return;