Merge branch 'master' into improve-dho-time-offsets

This commit is contained in:
smoogipoo
2020-11-30 18:01:48 +09:00
41 changed files with 527 additions and 240 deletions

View File

@ -190,7 +190,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
{
base.LoadComplete();
comboIndexBindable.BindValueChanged(_ => updateComboColour(), true);
comboIndexBindable.BindValueChanged(_ => UpdateComboColour(), true);
updateState(ArmedState.Idle, true);
}
@ -263,18 +263,15 @@ namespace osu.Game.Rulesets.Objects.Drawables
OnApply();
HitObjectApplied?.Invoke(this);
// If not loaded, the state update happens in LoadComplete(). Otherwise, the update is scheduled to allow for lifetime updates.
// If not loaded, the state update happens in LoadComplete().
if (IsLoaded)
{
Scheduler.Add(() =>
{
if (Result.IsHit)
updateState(ArmedState.Hit, true);
else if (Result.HasResult)
updateState(ArmedState.Miss, true);
else
updateState(ArmedState.Idle, true);
});
if (Result.IsHit)
updateState(ArmedState.Hit, true);
else if (Result.HasResult)
updateState(ArmedState.Miss, true);
else
updateState(ArmedState.Idle, true);
}
hasHitObjectApplied = true;
@ -533,7 +530,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
{
base.SkinChanged(skin, allowFallback);
updateComboColour();
UpdateComboColour();
ApplySkin(skin, allowFallback);
@ -541,7 +538,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
updateState(State.Value, true);
}
private void updateComboColour()
protected void UpdateComboColour()
{
if (!(HitObject is IHasComboInformation combo)) return;