Use BDL for top-level osu! DHOs

This commit is contained in:
smoogipoo
2020-11-05 13:51:46 +09:00
parent a386765a9d
commit 9a7fcadabc
14 changed files with 118 additions and 152 deletions

View File

@ -5,13 +5,11 @@ using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Rulesets.Objects.Types;
using osuTK;
namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
public class DrawableSliderHead : DrawableHitCircle
{
private readonly IBindable<Vector2> positionBindable = new Bindable<Vector2>();
private readonly IBindable<int> pathVersion = new Bindable<int>();
protected override OsuSkinComponents CirclePieceComponent => OsuSkinComponents.SliderHeadHitCircle;
@ -27,10 +25,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
[BackgroundDependencyLoader]
private void load()
{
positionBindable.BindTo(HitObject.PositionBindable);
pathVersion.BindTo(slider.Path.Version);
positionBindable.BindValueChanged(_ => updatePosition());
PositionBindable.BindValueChanged(_ => updatePosition());
pathVersion.BindValueChanged(_ => updatePosition(), true);
}