mirror of
https://github.com/osukey/osukey.git
synced 2025-05-26 07:57:32 +09:00
Add argon hit target pieces
This commit is contained in:
parent
d32eb64561
commit
36e2f5c512
33
osu.Game.Rulesets.Mania/Skinning/Argon/ArgonHitTarget.cs
Normal file
33
osu.Game.Rulesets.Mania/Skinning/Argon/ArgonHitTarget.cs
Normal 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
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Effects;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Rulesets.Mania.UI;
|
using osu.Game.Rulesets.Mania.UI;
|
||||||
using osu.Game.Rulesets.UI.Scrolling;
|
using osu.Game.Rulesets.UI.Scrolling;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -26,6 +27,8 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
private Container keyIcon = null!;
|
private Container keyIcon = null!;
|
||||||
private Drawable background = null!;
|
private Drawable background = null!;
|
||||||
|
|
||||||
|
private Circle hitTargetLine = null!;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private Column column { get; set; } = null!;
|
private Column column { get; set; } = null!;
|
||||||
|
|
||||||
@ -61,6 +64,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Children = new[]
|
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
|
new Circle
|
||||||
{
|
{
|
||||||
Y = icon_vertical_offset,
|
Y = icon_vertical_offset,
|
||||||
@ -149,13 +161,18 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
|
|
||||||
foreach (var circle in keyIcon.Children.OfType<CompositeDrawable>())
|
foreach (var circle in keyIcon.Children.OfType<CompositeDrawable>())
|
||||||
{
|
{
|
||||||
|
if (circle != hitTargetLine)
|
||||||
circle.ScaleTo(0.9f, 50, Easing.OutQuint);
|
circle.ScaleTo(0.9f, 50, Easing.OutQuint);
|
||||||
|
|
||||||
circle.FadeColour(Color4.White, 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
|
circle.TransformTo(nameof(EdgeEffect), new EdgeEffectParameters
|
||||||
{
|
{
|
||||||
Type = EdgeEffectType.Glow,
|
Type = EdgeEffectType.Glow,
|
||||||
Colour = Color4.White.Opacity(circle is Circle ? 0.05f : 0.2f),
|
Colour = Color4.White.Opacity(f),
|
||||||
Radius = 40,
|
Radius = 40,
|
||||||
}, 50, Easing.OutQuint);
|
}, 50, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
@ -175,7 +192,11 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
circle.ScaleTo(1f, 200, Easing.OutQuint);
|
circle.ScaleTo(1f, 200, Easing.OutQuint);
|
||||||
|
|
||||||
// TODO: temp lol
|
// 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.FadeColour(column.AccentColour, 800, Easing.OutQuint);
|
||||||
|
|
||||||
circle.TransformTo(nameof(EdgeEffect), new EdgeEffectParameters
|
circle.TransformTo(nameof(EdgeEffect), new EdgeEffectParameters
|
||||||
|
@ -20,6 +20,9 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
|||||||
case ManiaSkinComponent maniaComponent:
|
case ManiaSkinComponent maniaComponent:
|
||||||
switch (maniaComponent.Component)
|
switch (maniaComponent.Component)
|
||||||
{
|
{
|
||||||
|
case ManiaSkinComponents.HitTarget:
|
||||||
|
return new ArgonHitTarget();
|
||||||
|
|
||||||
case ManiaSkinComponents.KeyArea:
|
case ManiaSkinComponents.KeyArea:
|
||||||
return new ArgonKeyArea();
|
return new ArgonKeyArea();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user