Fix colour not updated when index changes

This commit is contained in:
ekrctb
2020-11-27 11:41:39 +09:00
parent dbf67f82c0
commit e36bb7631d
3 changed files with 11 additions and 20 deletions

View File

@ -12,8 +12,6 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
public class DrawableFruit : DrawablePalpableCatchHitObject
{
public readonly Bindable<int> IndexInBeatmap = new Bindable<int>();
public readonly Bindable<FruitVisualRepresentation> VisualRepresentation = new Bindable<FruitVisualRepresentation>();
protected virtual FruitVisualRepresentation GetVisualRepresentation(int indexInBeatmap) => (FruitVisualRepresentation)(indexInBeatmap % 4);
@ -23,7 +21,6 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
public DrawableFruit(CatchHitObject h)
: base(h)
{
IndexInBeatmap.Value = h.IndexInBeatmap;
}
[BackgroundDependencyLoader]
@ -51,20 +48,6 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
});
}
protected override void OnApply()
{
base.OnApply();
IndexInBeatmap.BindTo(HitObject.IndexInBeatmapBindable);
}
protected override void OnFree()
{
IndexInBeatmap.UnbindFrom(HitObject.IndexInBeatmapBindable);
base.OnFree();
}
protected override void Update()
{
base.Update();