1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 13:33:03 +08:00

Make sliders slightly nicer by using the new path drawable.

This commit is contained in:
Thomas Müller 2016-11-27 15:36:31 +01:00
parent 1427cce76f
commit 0cd0c4564f
3 changed files with 14 additions and 14 deletions

@ -1 +1 @@
Subproject commit 24af3b161da9447b678edd8ec32193df54f71e3b
Subproject commit e4be270dd0bc83fea058351eface27f4128d7121

View File

@ -24,7 +24,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
private GlowPiece glow;
private HitExplosion explosion;
public DrawableHitCircle(HitCircle h) : base(h)
public DrawableHitCircle(OsuHitObject h) : base(h)
{
osuObject = h;

View File

@ -2,6 +2,7 @@
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Objects.Drawables.Pieces;
using OpenTK;
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Modes.Osu.Objects.Drawables
{
@ -10,17 +11,16 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
public DrawableSlider(Slider h) : base(h)
{
Origin = Anchor.Centre;
RelativePositionAxes = Axes.Both;
Position = new Vector2(h.Position.X / 512, h.Position.Y / 384);
Position = new Vector2(h.Position.X, h.Position.Y);
for (float i = 0; i <= 1; i += 0.1f)
{
Add(new CirclePiece
{
Colour = h.Colour,
Position = h.Curve.PositionAt(i) - h.Position //non-relative?
});
}
Path sliderPath;
Add(sliderPath = new Path());
for (int i = 0; i < h.Curve.Path.Count; ++i)
sliderPath.Positions.Add(h.Curve.Path[i] - h.Position);
h.Position = Vector2.Zero;
Add(new DrawableHitCircle(h));
}
protected override void LoadComplete()
@ -39,10 +39,10 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
Alpha = 0;
Delay(HitObject.StartTime - 200 - Time.Current, true);
Delay(HitObject.StartTime - 450 - Time.Current, true);
FadeIn(200);
Delay(200 + HitObject.Duration);
Delay(450 + HitObject.Duration);
FadeOut(200);
}
}