From 8ac6818639c93751a3b7212d05a987ead1bc4adc Mon Sep 17 00:00:00 2001 From: Aergwyn Date: Sat, 13 Jan 2018 13:05:23 +0100 Subject: [PATCH] expose IsHit --- osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs index e43ef1cc60..af14c43a3f 100644 --- a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs @@ -49,6 +49,11 @@ public abstract class DrawableHitObject : Container, IHasAccentColour /// public virtual bool DisplayJudgement => true; + /// + /// Whether this and all of its nested s have been hit. + /// + public bool IsHit => Judgements.Any(j => j.Final && j.IsHit) && (NestedHitObjects?.All(n => n.IsHit) ?? true); + /// /// Whether this and all of its nested s have been judged. ///