//Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using osu.Framework.Configuration; using osu.Game.Modes.Objects.Drawables; namespace osu.Game.Modes { public class ScoreProcessor { public virtual Score GetScore() => new Score(); public BindableDouble TotalScore = new BindableDouble { MinValue = 0 }; public BindableDouble Accuracy = new BindableDouble { MinValue = 0, MaxValue = 1 }; public BindableInt Combo = new BindableInt(); public BindableInt MaximumCombo = new BindableInt(); public List Judgements = new List(); public virtual void AddJudgement(JudgementInfo judgement) { Judgements.Add(judgement); UpdateCalculations(); judgement.ComboAtHit = (ulong)Combo.Value; if (Combo.Value > MaximumCombo.Value) MaximumCombo.Value = Combo.Value; } /// /// Update any values that potentially need post-processing on a judgement change. /// protected virtual void UpdateCalculations() { } } }