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

52 lines
1.7 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.
2020-12-04 20:21:53 +09:00
using osu.Framework.Allocation;
using osu.Framework.Audio.Track;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics.Containers;
2020-04-05 13:36:52 +03:00
using osu.Game.Rulesets.Objects.Drawables;
2020-12-04 20:21:53 +09:00
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Skinning;
using osuTK;
2020-12-04 20:21:53 +09:00
namespace osu.Game.Rulesets.Osu.Skinning.Default
{
2022-11-24 14:32:20 +09:00
public partial class ReverseArrowPiece : BeatSyncedContainer
{
2020-04-05 13:36:52 +03:00
[Resolved]
private DrawableHitObject drawableRepeat { get; set; } = null!;
2020-04-05 12:45:10 +03:00
2020-01-14 18:14:31 +09:00
public ReverseArrowPiece()
{
Divisor = 2;
MinimumBeatLength = 200;
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
Size = new Vector2(OsuHitObject.OBJECT_RADIUS * 2);
Child = new SkinnableDrawable(new OsuSkinComponentLookup(OsuSkinComponents.ReverseArrow), _ => new SpriteIcon
{
RelativeSizeAxes = Axes.Both,
2020-04-08 18:58:09 +09:00
Blending = BlendingParameters.Additive,
Icon = FontAwesome.Solid.ChevronRight,
Size = new Vector2(0.35f)
2020-01-14 01:45:32 +09:00
})
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
};
}
2020-06-23 13:49:18 +09:00
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, ChannelAmplitudes amplitudes)
2020-04-05 12:45:10 +03:00
{
2020-04-05 13:39:31 +03:00
if (!drawableRepeat.IsHit)
2020-04-05 12:45:10 +03:00
Child.ScaleTo(1.3f).ScaleTo(1f, timingPoint.BeatLength, Easing.Out);
}
}
}