From b35817c8779cf5a761a432a8c3f14d8a688f9d7c Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 6 Aug 2018 10:55:38 +0900 Subject: [PATCH] More xmldocs to hitobject/drawablehitobject --- osu.Game/Rulesets/Judgements/Judgement.cs | 4 ++++ osu.Game/Rulesets/Judgements/JudgementResult.cs | 16 ++++++++++++---- .../Objects/Drawables/DrawableHitObject.cs | 12 ++++++++++-- osu.Game/Rulesets/Objects/HitObject.cs | 8 ++++++-- 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/osu.Game/Rulesets/Judgements/Judgement.cs b/osu.Game/Rulesets/Judgements/Judgement.cs index 5fddbe0b0a..c679df5900 100644 --- a/osu.Game/Rulesets/Judgements/Judgement.cs +++ b/osu.Game/Rulesets/Judgements/Judgement.cs @@ -1,10 +1,14 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Judgements { + /// + /// The scoring information provided by a . + /// public class Judgement { /// diff --git a/osu.Game/Rulesets/Judgements/JudgementResult.cs b/osu.Game/Rulesets/Judgements/JudgementResult.cs index 6971fcf593..5cadf7e2ee 100644 --- a/osu.Game/Rulesets/Judgements/JudgementResult.cs +++ b/osu.Game/Rulesets/Judgements/JudgementResult.cs @@ -1,10 +1,14 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Judgements { + /// + /// The scoring result of a . + /// public class JudgementResult { /// @@ -19,22 +23,22 @@ namespace osu.Game.Rulesets.Judgements /// /// The offset from a perfect hit at which this occurred. - /// Populated when added via . + /// Populated when this is applied via . /// public double TimeOffset { get; internal set; } /// - /// The combo prior to this judgement occurring. + /// The combo prior to this occurring. /// public int ComboAtJudgement { get; internal set; } /// - /// The highest combo achieved prior to this judgement occurring. + /// The highest combo achieved prior to this occurring. /// public int HighestComboAtJudgement { get; internal set; } /// - /// Whether this has a result. + /// Whether a miss or hit occurred. /// public bool HasResult => Type > HitResult.None; @@ -43,6 +47,10 @@ namespace osu.Game.Rulesets.Judgements /// public bool IsHit => Type > HitResult.Miss; + /// + /// Creates a new . + /// + /// The to refer to for scoring information. public JudgementResult(Judgement judgement) { Judgement = judgement; diff --git a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs index 0bc7a160ce..4b3129929e 100644 --- a/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs @@ -67,6 +67,9 @@ namespace osu.Game.Rulesets.Objects.Drawables /// public bool Judged => Result?.HasResult ?? true; + /// + /// The scoring result of this . + /// public readonly JudgementResult Result; private bool judgementOccurred; @@ -177,9 +180,10 @@ namespace osu.Game.Rulesets.Objects.Drawables } /// - /// Notifies that a new judgement has occurred for this . + /// Applies the of this , notifying responders such as + /// the of the . /// - /// The . + /// The callback that applies changes to the . protected void ApplyResult(Action application) { application?.Invoke(Result); @@ -240,6 +244,10 @@ namespace osu.Game.Rulesets.Objects.Drawables { } + /// + /// Creates the that represents the scoring result for this . + /// + /// The that provides the scoring information. protected virtual JudgementResult CreateJudgementResult(Judgement judgement) => new JudgementResult(judgement); } diff --git a/osu.Game/Rulesets/Objects/HitObject.cs b/osu.Game/Rulesets/Objects/HitObject.cs index 531a8bed38..a9cf23f924 100644 --- a/osu.Game/Rulesets/Objects/HitObject.cs +++ b/osu.Game/Rulesets/Objects/HitObject.cs @@ -108,10 +108,14 @@ namespace osu.Game.Rulesets.Objects { } - protected virtual Judgement CreateJudgement() => null; - protected void AddNested(HitObject hitObject) => nestedHitObjects.Value.Add(hitObject); + /// + /// Creates the that represents the scoring information for this . + /// May be null. + /// + protected virtual Judgement CreateJudgement() => null; + /// /// Creates the for this . /// This can be null to indicate that the has no .