mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
Update state based on result during LoadComplete
This commit is contained in:
parent
61bfd2f6b2
commit
cff3e06ad6
@ -199,7 +199,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
comboColourBrightness.BindValueChanged(_ => UpdateComboColour());
|
||||
|
||||
// Apply transforms
|
||||
updateState(State.Value, true);
|
||||
updateStateBasedOnResults();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -266,12 +266,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
// If not loaded, the state update happens in LoadComplete().
|
||||
if (IsLoaded)
|
||||
{
|
||||
if (Result.IsHit)
|
||||
updateState(ArmedState.Hit, true);
|
||||
else if (Result.HasResult)
|
||||
updateState(ArmedState.Miss, true);
|
||||
else
|
||||
updateState(ArmedState.Idle, true);
|
||||
updateStateBasedOnResults();
|
||||
|
||||
// Combo colour may have been applied via a bindable flow while no object entry was attached.
|
||||
// Update here to ensure we're in a good state.
|
||||
@ -279,6 +274,16 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
private void updateStateBasedOnResults()
|
||||
{
|
||||
if (Result.IsHit)
|
||||
updateState(ArmedState.Hit, true);
|
||||
else if (Result.HasResult)
|
||||
updateState(ArmedState.Miss, true);
|
||||
else
|
||||
updateState(ArmedState.Idle, true);
|
||||
}
|
||||
|
||||
protected sealed override void OnFree(HitObjectLifetimeEntry entry)
|
||||
{
|
||||
StartTimeBindable.UnbindFrom(HitObject.StartTimeBindable);
|
||||
|
Loading…
Reference in New Issue
Block a user