1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Add argon hit target pieces

This commit is contained in:
Dean Herbert 2022-09-27 19:48:27 +09:00
parent d32eb64561
commit 36e2f5c512
3 changed files with 60 additions and 3 deletions

View File

@ -0,0 +1,33 @@
// 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.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Rulesets.Mania.Skinning.Default;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Mania.Skinning.Argon
{
public class ArgonHitTarget : CompositeDrawable
{
[BackgroundDependencyLoader]
private void load()
{
RelativeSizeAxes = Axes.X;
Height = DefaultNotePiece.NOTE_HEIGHT;
InternalChildren = new[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0.3f,
Blending = BlendingParameters.Additive,
Colour = Color4.White
},
};
}
}
}

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.UI.Scrolling;
using osuTK;
@ -26,6 +27,8 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
private Container keyIcon = null!;
private Drawable background = null!;
private Circle hitTargetLine = null!;
[Resolved]
private Column column { get; set; } = null!;
@ -61,6 +64,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
Origin = Anchor.TopCentre,
Children = new[]
{
hitTargetLine = new Circle()
{
RelativeSizeAxes = Axes.X,
Anchor = Anchor.TopCentre,
Origin = Anchor.Centre,
Colour = OsuColour.Gray(196 / 255f),
Height = 4,
Masking = true,
},
new Circle
{
Y = icon_vertical_offset,
@ -149,13 +161,18 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
foreach (var circle in keyIcon.Children.OfType<CompositeDrawable>())
{
circle.ScaleTo(0.9f, 50, Easing.OutQuint);
if (circle != hitTargetLine)
circle.ScaleTo(0.9f, 50, Easing.OutQuint);
circle.FadeColour(Color4.White, 50, Easing.OutQuint);
// TODO: VERY TMPOERAOIRY.
float f = circle == hitTargetLine ? 0.2f : (circle is Circle ? 0.05f : 0.2f);
circle.TransformTo(nameof(EdgeEffect), new EdgeEffectParameters
{
Type = EdgeEffectType.Glow,
Colour = Color4.White.Opacity(circle is Circle ? 0.05f : 0.2f),
Colour = Color4.White.Opacity(f),
Radius = 40,
}, 50, Easing.OutQuint);
}
@ -175,7 +192,11 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
circle.ScaleTo(1f, 200, Easing.OutQuint);
// TODO: temp lol
if (circle is Circle)
if (circle == hitTargetLine)
{
circle.FadeColour(OsuColour.Gray(196 / 255f), 800, Easing.OutQuint);
}
else if (circle is Circle)
circle.FadeColour(column.AccentColour, 800, Easing.OutQuint);
circle.TransformTo(nameof(EdgeEffect), new EdgeEffectParameters

View File

@ -20,6 +20,9 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
case ManiaSkinComponent maniaComponent:
switch (maniaComponent.Component)
{
case ManiaSkinComponents.HitTarget:
return new ArgonHitTarget();
case ManiaSkinComponents.KeyArea:
return new ArgonKeyArea();