mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add "Final" to better determine when to stop processing the hitobject
This commit is contained in:
@ -32,6 +32,11 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsHit => Result > HitResult.Miss;
|
public bool IsHit => Result > HitResult.Miss;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this judgement is the final judgement for the hit object.
|
||||||
|
/// </summary>
|
||||||
|
public bool Final = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The offset from a perfect hit at which this judgement occurred.
|
/// The offset from a perfect hit at which this judgement occurred.
|
||||||
/// Populated when added via <see cref="DrawableHitObject{TObject}.AddJudgement"/>.
|
/// Populated when added via <see cref="DrawableHitObject{TObject}.AddJudgement"/>.
|
||||||
|
@ -105,12 +105,12 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
private bool judgementOccurred;
|
private bool judgementOccurred;
|
||||||
private bool hasJudgementResult => Judgements.LastOrDefault()?.Result >= HitResult.Miss;
|
private bool judgementFinalized => judgements.LastOrDefault()?.Final == true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether this <see cref="DrawableHitObject"/> and all of its nested <see cref="DrawableHitObject"/>s have been judged.
|
/// Whether this <see cref="DrawableHitObject"/> and all of its nested <see cref="DrawableHitObject"/>s have been judged.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool AllJudged => (!ProvidesJudgement || hasJudgementResult) && (NestedHitObjects?.All(h => h.AllJudged) ?? true);
|
public virtual bool AllJudged => (!ProvidesJudgement || judgementFinalized) && (NestedHitObjects?.All(h => h.AllJudged) ?? true);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Notifies that a new judgement has occurred for this <see cref="DrawableHitObject"/>.
|
/// Notifies that a new judgement has occurred for this <see cref="DrawableHitObject"/>.
|
||||||
@ -159,7 +159,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
judgementOccurred |= d.UpdateJudgement(userTriggered);
|
judgementOccurred |= d.UpdateJudgement(userTriggered);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ProvidesJudgement || hasJudgementResult || judgementOccurred)
|
if (!ProvidesJudgement || judgementFinalized || judgementOccurred)
|
||||||
return judgementOccurred;
|
return judgementOccurred;
|
||||||
|
|
||||||
var endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
var endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
||||||
|
Reference in New Issue
Block a user