Fix incorrect bindable valuechanged usage

This commit is contained in:
smoogipoo 2019-12-18 21:08:38 +09:00
parent 4e11fb0fd7
commit cb5a35f8f9

View File

@ -60,8 +60,6 @@ namespace osu.Game.Screens.Select
AutoSizeAxes = Axes.Both,
Margin = new MarginPadding { Left = 70 }
});
Current.ValueChanged += _ => updateMultiplierText();
}
[BackgroundDependencyLoader]
@ -75,6 +73,13 @@ namespace osu.Game.Screens.Select
Hotkey = Key.F1;
}
protected override void LoadComplete()
{
base.LoadComplete();
Current.BindValueChanged(_ => updateMultiplierText(), true);
}
private void updateMultiplierText()
{
var multiplier = Current.Value.Aggregate(1.0, (current, mod) => current * mod.ScoreMultiplier);