Make top-level osu! objects use new methods

This commit is contained in:
smoogipoo
2020-11-06 23:09:23 +09:00
parent 7eceda242b
commit 33b629a87a
4 changed files with 40 additions and 6 deletions

View File

@ -9,6 +9,7 @@ using osu.Framework.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Graphics.Containers;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.UI;
using osuTK;
@ -49,6 +50,21 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
ShakeDuration = 30,
RelativeSizeAxes = Axes.Both
});
}
protected override void FreeAfterUse()
{
IndexInCurrentComboBindable.UnbindFrom(HitObject.IndexInCurrentComboBindable);
PositionBindable.UnbindFrom(HitObject.PositionBindable);
StackHeightBindable.UnbindFrom(HitObject.StackHeightBindable);
ScaleBindable.UnbindFrom(HitObject.ScaleBindable);
base.FreeAfterUse();
}
public override void Apply(HitObject hitObject)
{
base.Apply(hitObject);
IndexInCurrentComboBindable.BindTo(HitObject.IndexInCurrentComboBindable);
PositionBindable.BindTo(HitObject.PositionBindable);