1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-07 04:07:46 +08:00

47 lines
1.3 KiB
C#
Raw Normal View History

2018-01-05 20:21:19 +09:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-02-10 06:16:23 +01:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
2017-02-12 08:19:52 +01:00
using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
2017-02-10 06:16:23 +01:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
2017-02-10 06:16:23 +01:00
2017-04-18 16:05:58 +09:00
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
2017-02-10 06:16:23 +01:00
{
public class FollowPoint : Container
{
2017-03-07 10:59:19 +09:00
private const float width = 8;
2017-02-12 08:19:52 +01:00
public override bool RemoveWhenNotAlive => false;
2017-02-10 06:16:23 +01:00
public FollowPoint()
{
Origin = Anchor.Centre;
2017-02-12 08:19:52 +01:00
Masking = true;
AutoSizeAxes = Axes.Both;
CornerRadius = width / 2;
2017-06-12 12:48:47 +09:00
EdgeEffect = new EdgeEffectParameters
2017-02-12 08:19:52 +01:00
{
Type = EdgeEffectType.Glow,
Colour = Color4.White.Opacity(0.2f),
Radius = 4,
};
2017-02-10 06:16:23 +01:00
Children = new Drawable[]
{
2017-02-12 08:19:52 +01:00
new Box
2017-02-10 06:16:23 +01:00
{
2017-02-12 08:19:52 +01:00
Size = new Vector2(width),
2017-09-07 22:46:21 +09:00
Blending = BlendingMode.Additive,
2017-02-12 08:19:52 +01:00
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Alpha = 0.5f,
2017-02-10 06:16:23 +01:00
},
};
}
}
}