1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-09 09:37:42 +08:00
osu-lazer/osu.Game.Rulesets.Osu/Objects/Drawables/Connections/FollowPoint.cs

47 lines
1.4 KiB
C#
Raw Normal View History

2018-04-13 17:19:50 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
2018-07-30 05:20:37 +08:00
using osu.Game.Skinning;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
{
public class FollowPoint : Container
{
private const float width = 8;
public override bool RemoveWhenNotAlive => false;
public FollowPoint()
{
Origin = Anchor.Centre;
2018-07-30 05:20:37 +08:00
Child = new SkinnableDrawable("Play/osu/followpoint", _ => new Container
2018-04-13 17:19:50 +08:00
{
2018-07-30 05:20:37 +08:00
Masking = true,
AutoSizeAxes = Axes.Both,
CornerRadius = width / 2,
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = Color4.White.Opacity(0.2f),
Radius = 4,
},
Child = new Box
2018-04-13 17:19:50 +08:00
{
Size = new Vector2(width),
Blending = BlendingMode.Additive,
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Alpha = 0.5f,
2018-07-30 05:20:37 +08:00
}
}, restrictSize: false);
2018-04-13 17:19:50 +08:00
}
}
}