mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Add basic argon hits
This commit is contained in:
@ -0,0 +1,21 @@
|
|||||||
|
// 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.Colour;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Taiko.Skinning.Argon
|
||||||
|
{
|
||||||
|
public class ArgonCentreCirclePiece : ArgonCirclePiece
|
||||||
|
{
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
AccentColour = ColourInfo.GradientVertical(
|
||||||
|
new Color4(241, 0, 0, 255),
|
||||||
|
new Color4(167, 0, 0, 255)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
116
osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonCirclePiece.cs
Normal file
116
osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonCirclePiece.cs
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
// 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.Audio.Track;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Colour;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
|
using osuTK;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Taiko.Skinning.Argon
|
||||||
|
{
|
||||||
|
public abstract class ArgonCirclePiece : BeatSyncedContainer
|
||||||
|
{
|
||||||
|
private const double pre_beat_transition_time = 80;
|
||||||
|
|
||||||
|
private const float flash_opacity = 0.3f;
|
||||||
|
|
||||||
|
private ColourInfo accentColour;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The colour of the inner circle and outer glows.
|
||||||
|
/// </summary>
|
||||||
|
public ColourInfo AccentColour
|
||||||
|
{
|
||||||
|
get => accentColour;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
accentColour = value;
|
||||||
|
ring.Colour = AccentColour.MultiplyAlpha(0.5f);
|
||||||
|
ring2.Colour = AccentColour;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether Kiai mode effects are enabled for this circle piece.
|
||||||
|
/// </summary>
|
||||||
|
public bool KiaiMode { get; set; }
|
||||||
|
|
||||||
|
public Box FlashBox;
|
||||||
|
|
||||||
|
private readonly RingPiece ring;
|
||||||
|
private readonly RingPiece ring2;
|
||||||
|
|
||||||
|
protected ArgonCirclePiece()
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
EarlyActivationMilliseconds = pre_beat_transition_time;
|
||||||
|
|
||||||
|
AddRangeInternal(new Drawable[]
|
||||||
|
{
|
||||||
|
new Circle
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = new Color4(0, 22, 30, 190)
|
||||||
|
},
|
||||||
|
ring = new RingPiece(20 / 70f),
|
||||||
|
ring2 = new RingPiece(5 / 70f),
|
||||||
|
new CircularContainer
|
||||||
|
{
|
||||||
|
Name = "Flash layer",
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Masking = true,
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
FlashBox = new Box
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.White,
|
||||||
|
Blending = BlendingParameters.Additive,
|
||||||
|
Alpha = 0,
|
||||||
|
AlwaysPresent = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new SpriteIcon
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Icon = FontAwesome.Solid.AngleLeft,
|
||||||
|
Size = new Vector2(20 / 70f),
|
||||||
|
Scale = new Vector2(0.8f, 1)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private DrawableHitObject drawableHitObject { get; set; } = null!;
|
||||||
|
|
||||||
|
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, ChannelAmplitudes amplitudes)
|
||||||
|
{
|
||||||
|
if (!effectPoint.KiaiMode)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (drawableHitObject.State.Value == ArmedState.Idle)
|
||||||
|
{
|
||||||
|
FlashBox
|
||||||
|
.FadeTo(flash_opacity)
|
||||||
|
.Then()
|
||||||
|
.FadeOut(timingPoint.BeatLength * 0.75, Easing.OutSine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
// 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.Colour;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Taiko.Skinning.Argon
|
||||||
|
{
|
||||||
|
public class ArgonRimCirclePiece : ArgonCirclePiece
|
||||||
|
{
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
AccentColour = ColourInfo.GradientVertical(
|
||||||
|
new Color4(0, 161, 241, 255),
|
||||||
|
new Color4(0, 111, 167, 255)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
osu.Game.Rulesets.Taiko/Skinning/Argon/RingPiece.cs
Normal file
40
osu.Game.Rulesets.Taiko/Skinning/Argon/RingPiece.cs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// 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.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Taiko.Skinning.Argon
|
||||||
|
{
|
||||||
|
public class RingPiece : CircularContainer
|
||||||
|
{
|
||||||
|
private readonly float relativeBorderThickness;
|
||||||
|
|
||||||
|
public RingPiece(float relativeBorderThickness)
|
||||||
|
{
|
||||||
|
this.relativeBorderThickness = relativeBorderThickness;
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
Anchor = Anchor.Centre;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
|
Masking = true;
|
||||||
|
BorderColour = Color4.White;
|
||||||
|
|
||||||
|
Child = new Box
|
||||||
|
{
|
||||||
|
AlwaysPresent = true,
|
||||||
|
Alpha = 0,
|
||||||
|
RelativeSizeAxes = Axes.Both
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
BorderThickness = relativeBorderThickness * DrawSize.X;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -22,7 +22,10 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Argon
|
|||||||
switch (catchComponent.Component)
|
switch (catchComponent.Component)
|
||||||
{
|
{
|
||||||
case TaikoSkinComponents.CentreHit:
|
case TaikoSkinComponents.CentreHit:
|
||||||
return Drawable.Empty();
|
return new ArgonCentreCirclePiece();
|
||||||
|
|
||||||
|
case TaikoSkinComponents.RimHit:
|
||||||
|
return new ArgonRimCirclePiece();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user