// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Judgements { /// /// The scoring result of a . /// public class JudgementResult { /// /// Whether this is the result of a hit or a miss. /// public HitResult Type; /// /// The which this applies for. /// public readonly Judgement Judgement; /// /// The offset from a perfect hit at which this occurred. /// Populated when this is applied via . /// public double TimeOffset { get; internal set; } /// /// The combo prior to this occurring. /// public int ComboAtJudgement { get; internal set; } /// /// The highest combo achieved prior to this occurring. /// public int HighestComboAtJudgement { get; internal set; } /// /// The health prior to this occurring. /// public double HealthAtJudgement { get; internal set; } /// /// Whether a miss or hit occurred. /// public bool HasResult => Type > HitResult.None; /// /// Whether a successful hit occurred. /// public bool IsHit => Type > HitResult.Miss; /// /// Creates a new . /// /// The to refer to for scoring information. public JudgementResult(Judgement judgement) { Judgement = judgement; } public override string ToString() => $"{Type} (Score:{Judgement.NumericResultFor(this)} HP:{Judgement.HealthIncreaseFor(this)} {Judgement})"; } }