mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Remove stored hitobject references from skinnable components
This commit is contained in:
@ -32,6 +32,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
|
||||
private PlaySliderBody sliderBody => Body.Drawable as PlaySliderBody;
|
||||
|
||||
public readonly IBindable<int> PathVersion = new Bindable<int>();
|
||||
|
||||
private Container<DrawableSliderHead> headContainer;
|
||||
private Container<DrawableSliderTail> tailContainer;
|
||||
private Container<DrawableSliderTick> tickContainer;
|
||||
@ -51,7 +53,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
tailContainer = new Container<DrawableSliderTail> { RelativeSizeAxes = Axes.Both },
|
||||
tickContainer = new Container<DrawableSliderTick> { RelativeSizeAxes = Axes.Both },
|
||||
repeatContainer = new Container<DrawableSliderRepeat> { RelativeSizeAxes = Axes.Both },
|
||||
Ball = new SliderBall(HitObject, this)
|
||||
Ball = new SliderBall(this)
|
||||
{
|
||||
GetInitialHitAction = () => HeadCircle.HitAction,
|
||||
BypassAutoSizeAxes = Axes.Both,
|
||||
@ -61,6 +63,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
headContainer = new Container<DrawableSliderHead> { RelativeSizeAxes = Axes.Both },
|
||||
};
|
||||
|
||||
PathVersion.BindTo(HitObject.Path.Version);
|
||||
|
||||
PositionBindable.BindValueChanged(_ => Position = HitObject.StackedPosition, true);
|
||||
StackHeightBindable.BindValueChanged(_ => Position = HitObject.StackedPosition, true);
|
||||
ScaleBindable.BindValueChanged(scale => Ball.Scale = new Vector2(scale.NewValue), true);
|
||||
|
Reference in New Issue
Block a user