diff --git a/osu.Game.Modes.Taiko/UI/HitExplosion.cs b/osu.Game.Modes.Taiko/UI/HitExplosion.cs
index 94938a700d..e3fd89e2b5 100644
--- a/osu.Game.Modes.Taiko/UI/HitExplosion.cs
+++ b/osu.Game.Modes.Taiko/UI/HitExplosion.cs
@@ -18,12 +18,21 @@ namespace osu.Game.Modes.Taiko.UI
///
internal class HitExplosion : CircularContainer
{
- private readonly TaikoJudgement judgement;
+ ///
+ /// The size of a hit explosion if a hit object has been hit with the second key.
+ ///
+ private const float secondhit_scale = 1.5f;
+
+ ///
+ /// The judgement this hit explosion visualises.
+ ///
+ public readonly TaikoJudgement Judgement;
+
private readonly Box innerFill;
public HitExplosion(TaikoJudgement judgement)
{
- this.judgement = judgement;
+ Judgement = judgement;
Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2);
@@ -50,10 +59,7 @@ namespace osu.Game.Modes.Taiko.UI
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
- if (judgement.SecondHit)
- Size *= 1.5f;
-
- switch (judgement.TaikoResult)
+ switch (Judgement.TaikoResult)
{
case TaikoHitResult.Good:
innerFill.Colour = colours.Green;
@@ -73,5 +79,13 @@ namespace osu.Game.Modes.Taiko.UI
Expire();
}
+
+ ///
+ /// Transforms this hit explosion to visualise a secondary hit.
+ ///
+ public void VisualiseSecondHit()
+ {
+ ResizeTo(Size * secondhit_scale, 50);
+ }
}
}
diff --git a/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs
index b6165b785b..8efb815fc0 100644
--- a/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs
+++ b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs
@@ -15,6 +15,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics.Primitives;
using osu.Game.Modes.Taiko.Objects.Drawable;
+using System.Linq;
namespace osu.Game.Modes.Taiko.UI
{
@@ -176,9 +177,7 @@ namespace osu.Game.Modes.Taiko.UI
public override void OnJudgement(DrawableHitObject judgedObject)
{
bool wasHit = judgedObject.Judgement.Result == HitResult.Hit;
-
- if (wasHit)
- hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement));
+ bool secondHit = judgedObject.Judgement.SecondHit;
judgementContainer.Add(new DrawableTaikoJudgement(judgedObject.Judgement)
{
@@ -187,6 +186,22 @@ namespace osu.Game.Modes.Taiko.UI
RelativePositionAxes = Axes.X,
X = wasHit ? judgedObject.Position.X : 0,
});
+
+ if (!wasHit)
+ return;
+
+ if (!secondHit)
+ {
+ if (judgedObject.X >= -0.05f && !(judgedObject is DrawableSwell))
+ {
+ // If we're far enough away from the left stage, we should bring outselves in front of it
+ topLevelHitContainer.Add(judgedObject.CreateProxy());
+ }
+
+ hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement));
+ }
+ else
+ hitExplosionContainer.Children.FirstOrDefault(e => e.Judgement == judgedObject.Judgement)?.VisualiseSecondHit();
}
}
}
\ No newline at end of file