2019-01-24 16:43:03 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2020-11-22 03:06:30 +08:00
|
|
|
|
using osu.Framework.Bindables;
|
2018-11-20 15:51:59 +08:00
|
|
|
|
using osuTK;
|
|
|
|
|
using osuTK.Graphics;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Framework.Extensions.Color4Extensions;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2019-04-02 13:51:28 +08:00
|
|
|
|
using osu.Framework.Graphics.Effects;
|
2020-11-19 23:11:31 +08:00
|
|
|
|
using osu.Framework.Graphics.Pooling;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
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
|
|
|
|
|
{
|
2019-11-05 22:20:46 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A single follow point positioned between two adjacent <see cref="DrawableOsuHitObject"/>s.
|
|
|
|
|
/// </summary>
|
2020-11-19 23:11:31 +08:00
|
|
|
|
public class FollowPoint : PoolableDrawable, IAnimationTimeReference
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
private const float width = 8;
|
|
|
|
|
|
|
|
|
|
public override bool RemoveWhenNotAlive => false;
|
|
|
|
|
|
|
|
|
|
public FollowPoint()
|
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre;
|
|
|
|
|
|
2020-11-19 23:11:31 +08:00
|
|
|
|
InternalChild = new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.FollowPoint), _ => new CircularContainer
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2018-07-30 05:20:37 +08:00
|
|
|
|
Masking = true,
|
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
|
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),
|
2019-08-21 12:29:50 +08:00
|
|
|
|
Blending = BlendingParameters.Additive,
|
2018-04-13 17:19:50 +08:00
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
Anchor = Anchor.Centre,
|
2018-07-31 14:59:06 +08:00
|
|
|
|
Alpha = 0.5f,
|
2018-07-30 05:20:37 +08:00
|
|
|
|
}
|
2020-04-06 11:45:58 +08:00
|
|
|
|
});
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
2020-03-27 17:03:02 +08:00
|
|
|
|
|
2020-11-22 03:06:30 +08:00
|
|
|
|
public Bindable<double> AnimationStartTime { get; } = new BindableDouble();
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|