mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Cleanup TaikoPlayfield a bit
This commit is contained in:
parent
fb05552ac4
commit
3ef65a1e5d
@ -219,27 +219,25 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
|
|
||||||
public override void OnJudgement(DrawableHitObject judgedObject, Judgement judgement)
|
public override void OnJudgement(DrawableHitObject judgedObject, Judgement judgement)
|
||||||
{
|
{
|
||||||
bool wasHit = judgement.Result > HitResult.Miss;
|
|
||||||
bool secondHit = judgement is TaikoStrongHitJudgement;
|
|
||||||
var taikoObject = (TaikoHitObject)judgedObject.HitObject;
|
|
||||||
|
|
||||||
if (judgementContainer.FirstOrDefault(j => j.JudgedObject == judgedObject) == null)
|
if (judgementContainer.FirstOrDefault(j => j.JudgedObject == judgedObject) == null)
|
||||||
{
|
{
|
||||||
judgementContainer.Add(new DrawableTaikoJudgement(judgedObject, judgement)
|
judgementContainer.Add(new DrawableTaikoJudgement(judgedObject, judgement)
|
||||||
{
|
{
|
||||||
Anchor = wasHit ? Anchor.TopLeft : Anchor.CentreLeft,
|
Anchor = judgement.IsHit ? Anchor.TopLeft : Anchor.CentreLeft,
|
||||||
Origin = wasHit ? Anchor.BottomCentre : Anchor.Centre,
|
Origin = judgement.IsHit ? Anchor.BottomCentre : Anchor.Centre,
|
||||||
RelativePositionAxes = Axes.X,
|
RelativePositionAxes = Axes.X,
|
||||||
X = wasHit ? judgedObject.Position.X : 0,
|
X = judgement.IsHit ? judgedObject.Position.X : 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wasHit)
|
if (!judgement.IsHit)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool isRim = judgedObject.HitObject is RimHit;
|
bool isRim = judgedObject.HitObject is RimHit;
|
||||||
|
|
||||||
if (!secondHit)
|
if (judgement is TaikoStrongHitJudgement)
|
||||||
|
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == judgedObject)?.VisualiseSecondHit();
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (judgedObject.X >= -0.05f && judgedObject is DrawableHit)
|
if (judgedObject.X >= -0.05f && judgedObject is DrawableHit)
|
||||||
{
|
{
|
||||||
@ -249,11 +247,9 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
|
|
||||||
hitExplosionContainer.Add(new HitExplosion(judgedObject, isRim));
|
hitExplosionContainer.Add(new HitExplosion(judgedObject, isRim));
|
||||||
|
|
||||||
if (taikoObject.Kiai)
|
if (judgedObject.HitObject.Kiai)
|
||||||
kiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject, isRim));
|
kiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject, isRim));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == judgedObject)?.VisualiseSecondHit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user