1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 13:27:23 +08:00

Better looking follow points.

This commit is contained in:
Damnae 2017-02-12 08:19:52 +01:00
parent d7be9539d1
commit de2791e179

View File

@ -2,36 +2,47 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Framework.Allocation;
using OpenTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Transformations;
using osu.Game.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Connections
{
public class FollowPoint : Container
{
private Sprite followPoint;
public double StartTime;
public double EndTime;
public Vector2 EndPosition;
const float width = 8;
public FollowPoint()
{
Origin = Anchor.Centre;
Alpha = 0;
Masking = true;
AutoSizeAxes = Axes.Both;
CornerRadius = width / 2;
EdgeEffect = new EdgeEffect
{
Type = EdgeEffectType.Glow,
Colour = Color4.White.Opacity(0.2f),
Radius = 4,
};
Children = new Drawable[]
{
followPoint = new Sprite
new Box
{
Size = new Vector2(12f),
Origin = Anchor.Centre,
Size = new Vector2(width),
BlendingMode = BlendingMode.Additive,
Alpha = 0.5f
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Alpha = 0.5f,
},
};
}
@ -52,11 +63,5 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Connections
Delay(DrawableOsuHitObject.TIME_FADEIN);
Expire(true);
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
followPoint.Texture = textures.Get(@"Play/osu/ring-glow");
}
}
}