Separate slider body to bypass snaking logic

The snaking logic contains a lot of caching/optimisations and offsetting of the path which is tedious to re-compute when the path changes.
This commit is contained in:
smoogipoo
2018-10-25 15:49:45 +09:00
parent 30bf15ebf6
commit 86e09a68f7
4 changed files with 146 additions and 112 deletions

View File

@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public readonly DrawableHitCircle HeadCircle;
public readonly DrawableSliderTail TailCircle;
public readonly SliderBody Body;
public readonly SnakingSliderBody Body;
public readonly SliderBall Ball;
public DrawableSlider(Slider s)
@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
InternalChildren = new Drawable[]
{
Body = new SliderBody(s)
Body = new SnakingSliderBody(s)
{
PathWidth = s.Scale * 64,
},