mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 14:22:54 +08:00
Merge pull request #524 from peppy/update-state-safety
Make DrawableHitObject's UpdateState safer
This commit is contained in:
commit
b349c7d7fd
@ -111,8 +111,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateState(ArmedState state)
|
||||||
{
|
{
|
||||||
if (!IsLoaded) return;
|
|
||||||
|
|
||||||
base.UpdateState(state);
|
base.UpdateState(state);
|
||||||
|
|
||||||
ApproachCircle.FadeOut();
|
ApproachCircle.FadeOut();
|
||||||
|
@ -22,8 +22,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateState(ArmedState state)
|
||||||
{
|
{
|
||||||
if (!IsLoaded) return;
|
|
||||||
|
|
||||||
Flush();
|
Flush();
|
||||||
|
|
||||||
UpdateInitialState();
|
UpdateInitialState();
|
||||||
|
@ -158,8 +158,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateState(ArmedState state)
|
||||||
{
|
{
|
||||||
if (!IsLoaded) return;
|
|
||||||
|
|
||||||
base.UpdateState(state);
|
base.UpdateState(state);
|
||||||
|
|
||||||
ball.FadeIn();
|
ball.FadeIn();
|
||||||
|
@ -95,8 +95,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateState(ArmedState state)
|
||||||
{
|
{
|
||||||
if (!IsLoaded) return;
|
|
||||||
|
|
||||||
base.UpdateState(state);
|
base.UpdateState(state);
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
|
@ -134,8 +134,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateState(ArmedState state)
|
||||||
{
|
{
|
||||||
if (!IsLoaded) return;
|
|
||||||
|
|
||||||
base.UpdateState(state);
|
base.UpdateState(state);
|
||||||
|
|
||||||
Delay(spinner.Duration, true);
|
Delay(spinner.Duration, true);
|
||||||
|
@ -38,6 +38,9 @@ namespace osu.Game.Modes.Objects.Drawables
|
|||||||
return;
|
return;
|
||||||
state = value;
|
state = value;
|
||||||
|
|
||||||
|
if (!IsLoaded)
|
||||||
|
return;
|
||||||
|
|
||||||
UpdateState(state);
|
UpdateState(state);
|
||||||
|
|
||||||
if (State == ArmedState.Hit)
|
if (State == ArmedState.Hit)
|
||||||
|
Loading…
Reference in New Issue
Block a user