1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 17:27:24 +08:00

Make IsHit not consider nested hitobjects

This commit is contained in:
smoogipoo 2018-08-03 16:07:20 +09:00
parent 2a4994e5ce
commit 482526135f

View File

@ -43,16 +43,17 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// </summary>
public virtual bool DisplayJudgement => true;
/// <summary>
/// Whether this <see cref="DrawableHitObject"/> and all of its nested <see cref="DrawableHitObject"/>s have been hit.
/// </summary>
public bool IsHit => (Result?.IsHit ?? true) && NestedHitObjects.All(n => n.IsHit);
/// <summary>
/// Whether this <see cref="DrawableHitObject"/> and all of its nested <see cref="DrawableHitObject"/>s have been judged.
/// </summary>
public bool AllJudged => Judged && NestedHitObjects.All(h => h.AllJudged);
/// <summary>
/// Whether this <see cref="DrawableHitObject"/> has been hit. This occurs if <see cref="Result.IsHit"/> is <see cref="true"/>.
/// Note: This does NOT include nested hitobjects.
/// </summary>
public bool IsHit => Result?.IsHit ?? false;
/// <summary>
/// Whether this <see cref="DrawableHitObject"/> has been judged.
/// Note: This does NOT include nested hitobjects.