// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Rulesets.Objects.Drawables; namespace osu.Game.Rulesets.Judgements { public class Judgement { /// /// Whether this judgement is the result of a hit or a miss. /// public HitResult Result; /// /// The maximum that can be achieved. /// public virtual HitResult MaxResult => HitResult.Perfect; /// /// The combo prior to this judgement occurring. /// public int ComboAtJudgement; /// /// The highest combo achieved prior to this judgement occurring. /// public int HighestComboAtJudgement; /// /// Whether a successful hit occurred. /// public bool IsHit => Result > HitResult.Miss; /// /// Whether this judgement is the final judgement for the hit object. /// public bool Final = true; /// /// The offset from a perfect hit at which this judgement occurred. /// Populated when added via . /// public double TimeOffset { get; set; } /// /// Whether the should affect the combo portion of the score. /// If false, the will be considered for the bonus portion of the score. /// public virtual bool AffectsCombo => true; /// /// The numeric representation for the result achieved. /// public int NumericResult => NumericResultFor(Result); /// /// The numeric representation for the maximum achievable result. /// public int MaxNumericResult => NumericResultFor(MaxResult); /// /// Convert a to a numeric score representation. /// /// The value to convert. /// The number. protected virtual int NumericResultFor(HitResult result) => result > HitResult.Miss ? 1 : 0; } }