1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 04:32:11 +08:00

Update bindings in LoadComplete()

This commit is contained in:
smoogipoo
2020-04-14 15:52:38 +09:00
Unverified
parent 59728ffebd
commit f3dbddd75c
+5 -1
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();