Fix handling of bindable changes in accent colour

This commit is contained in:
Dean Herbert
2020-02-19 11:23:45 +09:00
parent f245fe5934
commit 0f85e81240
5 changed files with 47 additions and 48 deletions

View File

@ -10,8 +10,6 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
{
public class DrawableDroplet : PalpableCatchHitObject<Droplet>
{
private Pulp pulp;
public override bool StaysOnPlate => false;
public DrawableDroplet(Droplet h)
@ -25,9 +23,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
[BackgroundDependencyLoader]
private void load()
{
AddInternal(pulp = new Pulp { Size = Size });
AccentColour.BindValueChanged(colour => { pulp.AccentColour = colour.NewValue; }, true);
AddInternal(new Pulp
{
Size = Size,
AccentColour = { BindTarget = AccentColour }
});
}
}
}