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

Update bindings in LoadComplete()

This commit is contained in:
smoogipoo 2020-04-14 15:52:38 +09:00
parent 59728ffebd
commit f3dbddd75c

View File

@ -75,7 +75,11 @@ namespace osu.Game.Screens.Play.HUD
configEnabled = config.GetBindable<bool>(OsuSetting.FadePlayfieldWhenHealthLow);
enabled.BindValueChanged(e => this.FadeTo(e.NewValue ? 1 : 0, fade_time, Easing.OutQuint), true);
}
protected override void LoadComplete()
{
base.LoadComplete();
updateBindings();
}
@ -89,7 +93,7 @@ namespace osu.Game.Screens.Play.HUD
private void updateBindings()
{
if (configEnabled == null || healthProcessor == null)
if (LoadState < LoadState.Ready)
return;
enabled.UnbindBindings();