1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-07 18:47:26 +08:00
osu-lazer/osu.Game/Modes/ScoreProcesssor.cs

48 lines
1.4 KiB
C#
Raw Normal View History

2016-11-29 19:30:16 +08:00
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//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;
2016-11-29 19:30:16 +08:00
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();
2016-11-29 20:57:53 +08:00
public BindableInt MaximumCombo = new BindableInt();
public List<JudgementInfo> Judgements = new List<JudgementInfo>();
public virtual void AddJudgement(JudgementInfo judgement)
{
Judgements.Add(judgement);
UpdateCalculations();
2016-11-29 20:46:30 +08:00
judgement.ComboAtHit = (ulong)Combo.Value;
2016-11-29 20:57:53 +08:00
if (Combo.Value > MaximumCombo.Value)
MaximumCombo.Value = Combo.Value;
}
/// <summary>
/// Update any values that potentially need post-processing on a judgement change.
/// </summary>
protected virtual void UpdateCalculations()
{
}
2016-11-29 19:30:16 +08:00
}
}