Split ball and followcircle into default/legacy files

This commit is contained in:
goodtrailer
2022-06-29 01:23:35 -07:00
parent 7c9c499e19
commit 0e0e9968ac
7 changed files with 147 additions and 102 deletions

View File

@ -29,7 +29,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public DrawableSliderHead HeadCircle => headContainer.Child;
public DrawableSliderTail TailCircle => tailContainer.Child;
public SliderBall Ball { get; private set; }
[Cached]
public DrawableSliderBall Ball { get; private set; }
public SkinnableDrawable Body { get; private set; }
/// <summary>
@ -60,6 +62,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public DrawableSlider([CanBeNull] Slider s = null)
: base(s)
{
Ball = new DrawableSliderBall
{
GetInitialHitAction = () => HeadCircle.HitAction,
BypassAutoSizeAxes = Axes.Both,
AlwaysPresent = true,
Alpha = 0
};
}
[BackgroundDependencyLoader]
@ -73,13 +82,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
repeatContainer = new Container<DrawableSliderRepeat> { RelativeSizeAxes = Axes.Both },
headContainer = new Container<DrawableSliderHead> { RelativeSizeAxes = Axes.Both },
OverlayElementContainer = new Container { RelativeSizeAxes = Axes.Both, },
Ball = new SliderBall(this)
{
GetInitialHitAction = () => HeadCircle.HitAction,
BypassAutoSizeAxes = Axes.Both,
AlwaysPresent = true,
Alpha = 0
},
Ball,
slidingSample = new PausableSkinnableSound { Looping = true }
};