mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:52:54 +08:00
More xmldocs to hitobject/drawablehitobject
This commit is contained in:
parent
5fd4ed2f4e
commit
b35817c877
@ -1,10 +1,14 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Judgements
|
namespace osu.Game.Rulesets.Judgements
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The scoring information provided by a <see cref="HitObject"/>.
|
||||||
|
/// </summary>
|
||||||
public class Judgement
|
public class Judgement
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Judgements
|
namespace osu.Game.Rulesets.Judgements
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The scoring result of a <see cref="DrawableHitObject"/>.
|
||||||
|
/// </summary>
|
||||||
public class JudgementResult
|
public class JudgementResult
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -19,22 +23,22 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The offset from a perfect hit at which this <see cref="JudgementResult"/> occurred.
|
/// The offset from a perfect hit at which this <see cref="JudgementResult"/> occurred.
|
||||||
/// Populated when added via <see cref="DrawableHitObject.ApplyJudgement"/>.
|
/// Populated when this <see cref="JudgementResult"/> is applied via <see cref="DrawableHitObject.ApplyResult"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double TimeOffset { get; internal set; }
|
public double TimeOffset { get; internal set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The combo prior to this judgement occurring.
|
/// The combo prior to this <see cref="JudgementResult"/> occurring.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ComboAtJudgement { get; internal set; }
|
public int ComboAtJudgement { get; internal set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The highest combo achieved prior to this judgement occurring.
|
/// The highest combo achieved prior to this <see cref="JudgementResult"/> occurring.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int HighestComboAtJudgement { get; internal set; }
|
public int HighestComboAtJudgement { get; internal set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether this <see cref="Judgement"/> has a result.
|
/// Whether a miss or hit occurred.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HasResult => Type > HitResult.None;
|
public bool HasResult => Type > HitResult.None;
|
||||||
|
|
||||||
@ -43,6 +47,10 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsHit => Type > HitResult.Miss;
|
public bool IsHit => Type > HitResult.Miss;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new <see cref="JudgementResult"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="judgement">The <see cref="Judgement"/> to refer to for scoring information.</param>
|
||||||
public JudgementResult(Judgement judgement)
|
public JudgementResult(Judgement judgement)
|
||||||
{
|
{
|
||||||
Judgement = judgement;
|
Judgement = judgement;
|
||||||
|
@ -67,6 +67,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Judged => Result?.HasResult ?? true;
|
public bool Judged => Result?.HasResult ?? true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The scoring result of this <see cref="DrawableHitObject"/>.
|
||||||
|
/// </summary>
|
||||||
public readonly JudgementResult Result;
|
public readonly JudgementResult Result;
|
||||||
|
|
||||||
private bool judgementOccurred;
|
private bool judgementOccurred;
|
||||||
@ -177,9 +180,10 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Notifies that a new judgement has occurred for this <see cref="DrawableHitObject"/>.
|
/// Applies the <see cref="Result"/> of this <see cref="DrawableHitObject"/>, notifying responders such as
|
||||||
|
/// the <see cref="ScoreProcessor"/> of the <see cref="JudgementResult"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="judgement">The <see cref="Judgement"/>.</param>
|
/// <param name="application">The callback that applies changes to the <see cref="JudgementResult"/>.</param>
|
||||||
protected void ApplyResult(Action<JudgementResult> application)
|
protected void ApplyResult(Action<JudgementResult> application)
|
||||||
{
|
{
|
||||||
application?.Invoke(Result);
|
application?.Invoke(Result);
|
||||||
@ -240,6 +244,10 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the <see cref="JudgementResult"/> that represents the scoring result for this <see cref="DrawableHitObject"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="judgement">The <see cref="Judgement"/> that provides the scoring information.</param>
|
||||||
protected virtual JudgementResult CreateJudgementResult(Judgement judgement) => new JudgementResult(judgement);
|
protected virtual JudgementResult CreateJudgementResult(Judgement judgement) => new JudgementResult(judgement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,10 +108,14 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual Judgement CreateJudgement() => null;
|
|
||||||
|
|
||||||
protected void AddNested(HitObject hitObject) => nestedHitObjects.Value.Add(hitObject);
|
protected void AddNested(HitObject hitObject) => nestedHitObjects.Value.Add(hitObject);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the <see cref="Judgement"/> that represents the scoring information for this <see cref="HitObject"/>.
|
||||||
|
/// May be null.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual Judgement CreateJudgement() => null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the <see cref="HitWindows"/> for this <see cref="HitObject"/>.
|
/// Creates the <see cref="HitWindows"/> for this <see cref="HitObject"/>.
|
||||||
/// This can be null to indicate that the <see cref="HitObject"/> has no <see cref="HitWindows"/>.
|
/// This can be null to indicate that the <see cref="HitObject"/> has no <see cref="HitWindows"/>.
|
||||||
|
Loading…
Reference in New Issue
Block a user