Fix circle depth and explicitly create a hitcircle for now.

This commit is contained in:
Dean Herbert 2016-11-28 12:15:25 +09:00
parent cfb2285312
commit 97e4653735
2 changed files with 13 additions and 7 deletions

View File

@ -8,19 +8,25 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
{ {
class DrawableSlider : DrawableOsuHitObject class DrawableSlider : DrawableOsuHitObject
{ {
public DrawableSlider(Slider h) : base(h) public DrawableSlider(Slider s) : base(s)
{ {
Origin = Anchor.Centre; Origin = Anchor.Centre;
Position = new Vector2(h.Position.X, h.Position.Y); Position = new Vector2(s.Position.X, s.Position.Y);
Path sliderPath; Path sliderPath;
Add(sliderPath = new Path()); Add(sliderPath = new Path());
for (int i = 0; i < h.Curve.Path.Count; ++i) for (int i = 0; i < s.Curve.Path.Count; ++i)
sliderPath.Positions.Add(h.Curve.Path[i] - h.Position); sliderPath.Positions.Add(s.Curve.Path[i] - s.Position);
h.Position = Vector2.Zero; Add(new DrawableHitCircle(new HitCircle
Add(new DrawableHitCircle(h)); {
StartTime = s.StartTime,
Position = sliderPath.Positions[0] - s.Position,
})
{
Depth = 1
});
} }
protected override void LoadComplete() protected override void LoadComplete()

View File

@ -201,5 +201,5 @@ namespace osu.Game.Modes.Osu.Objects
Bezier, Bezier,
Linear, Linear,
PerfectCurve PerfectCurve
}; }
} }