mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Make Rulesets.Taiko use the new judgement result structure
This commit is contained in:
@ -19,16 +19,16 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
/// Creates a new judgement text.
|
||||
/// </summary>
|
||||
/// <param name="judgedObject">The object which is being judged.</param>
|
||||
/// <param name="judgement">The judgement to visualise.</param>
|
||||
public DrawableTaikoJudgement(Judgement judgement, DrawableHitObject judgedObject)
|
||||
: base(judgement, judgedObject)
|
||||
/// <param name="result">The judgement to visualise.</param>
|
||||
public DrawableTaikoJudgement(JudgementResult result, DrawableHitObject judgedObject)
|
||||
: base(result, judgedObject)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
switch (Judgement.Result)
|
||||
switch (Result.Type)
|
||||
{
|
||||
case HitResult.Good:
|
||||
Colour = colours.GreenLight;
|
||||
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
if (Judgement.IsHit)
|
||||
if (Result.IsHit)
|
||||
this.MoveToY(-100, 500);
|
||||
|
||||
base.LoadComplete();
|
||||
|
@ -224,28 +224,28 @@ namespace osu.Game.Rulesets.Taiko.UI
|
||||
}
|
||||
}
|
||||
|
||||
internal void OnJudgement(DrawableHitObject judgedObject, Judgement judgement)
|
||||
internal void OnJudgement(DrawableHitObject judgedObject, JudgementResult result)
|
||||
{
|
||||
if (!DisplayJudgements)
|
||||
return;
|
||||
|
||||
if (judgedObject.DisplayJudgement && judgementContainer.FirstOrDefault(j => j.JudgedObject == judgedObject) == null)
|
||||
{
|
||||
judgementContainer.Add(new DrawableTaikoJudgement(judgement, judgedObject)
|
||||
judgementContainer.Add(new DrawableTaikoJudgement(result, judgedObject)
|
||||
{
|
||||
Anchor = judgement.IsHit ? Anchor.TopLeft : Anchor.CentreLeft,
|
||||
Origin = judgement.IsHit ? Anchor.BottomCentre : Anchor.Centre,
|
||||
Anchor = result.IsHit ? Anchor.TopLeft : Anchor.CentreLeft,
|
||||
Origin = result.IsHit ? Anchor.BottomCentre : Anchor.Centre,
|
||||
RelativePositionAxes = Axes.X,
|
||||
X = judgement.IsHit ? judgedObject.Position.X : 0,
|
||||
X = result.IsHit ? judgedObject.Position.X : 0,
|
||||
});
|
||||
}
|
||||
|
||||
if (!judgement.IsHit)
|
||||
if (!result.IsHit)
|
||||
return;
|
||||
|
||||
bool isRim = judgedObject.HitObject is RimHit;
|
||||
|
||||
if (judgement is TaikoStrongHitJudgement)
|
||||
if (result.Judgement is TaikoStrongHitJudgement)
|
||||
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == judgedObject)?.VisualiseSecondHit();
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user