1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:07:38 +08:00

Simplify changes

This commit is contained in:
Salman Ahmed 2019-07-03 06:44:17 +03:00 committed by KingLuigi4932
parent 3f39541cc2
commit 98daaf634a

View File

@ -22,13 +22,12 @@ namespace osu.Game.Rulesets.Mods
public void ReadFromConfig(OsuConfigManager config)
{
hideHealthBar = config.GetBindable<bool>(OsuSetting.HideHealthBar);
hideHealthBar.ValueChanged += v => healthDisplay?.FadeTo(v.NewValue ? 0 : 1, 250, Easing.OutQuint);
}
public void ApplyToHUD(HUDOverlay overlay)
{
healthDisplay = overlay.HealthDisplay;
hideHealthBar?.TriggerChange();
hideHealthBar.BindValueChanged(v => healthDisplay.FadeTo(v.NewValue ? 0 : 1, 250, Easing.OutQuint), true);
}
}
}