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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.8 KiB
C#
Raw Normal View History

// 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 18:19:50 +09:00
using osu.Framework.Bindables;
2018-11-20 16:51:59 +09:00
using osuTK;
using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
2017-02-10 06:16:23 +01:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
2019-04-02 14:51:28 +09:00
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Pooling;
using osu.Framework.Graphics.Shapes;
2018-07-29 23:20:37 +02:00
using osu.Game.Skinning;
2018-04-13 18:19:50 +09: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
{
2019-11-05 23:20:46 +09:00
/// <summary>
/// A single follow point positioned between two adjacent <see cref="DrawableOsuHitObject"/>s.
/// </summary>
public partial class FollowPoint : PoolableDrawable, IAnimationTimeReference
2017-02-10 06:16:23 +01:00
{
2017-03-07 10:59:19 +09:00
private const float width = 8;
2018-04-13 18:19:50 +09:00
public override bool RemoveWhenNotAlive => false;
2018-04-13 18:19:50 +09:00
2017-02-10 06:16:23 +01:00
public FollowPoint()
{
Origin = Anchor.Centre;
2018-04-13 18:19:50 +09:00
InternalChild = new SkinnableDrawable(new OsuSkinComponentLookup(OsuSkinComponents.FollowPoint), _ => new CircularContainer
2017-02-12 08:19:52 +01:00
{
2018-07-29 23:20:37 +02:00
Masking = true,
AutoSizeAxes = Axes.Both,
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = Color4.White.Opacity(0.2f),
Radius = 4,
},
Child = new Box
2017-02-10 06:16:23 +01:00
{
2017-02-12 08:19:52 +01:00
Size = new Vector2(width),
2019-08-21 13:29:50 +09:00
Blending = BlendingParameters.Additive,
2017-02-12 08:19:52 +01:00
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Alpha = 0.5f,
2018-07-29 23:20:37 +02:00
}
});
2017-02-10 06:16:23 +01:00
}
public Bindable<double> AnimationStartTime { get; } = new BindableDouble();
2017-02-10 06:16:23 +01:00
}
}