// 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; public bool IsHit => Result > HitResult.Miss; /// /// The offset at which this judgement occurred. /// public double TimeOffset; 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; } }