Keep track of maximum hits + combo at base ScoreProcessor level

This commit is contained in:
smoogipooo 2017-09-12 19:48:17 +09:00
parent c7677d896a
commit 195c2d7a31
1 changed files with 12 additions and 2 deletions

View File

@ -143,6 +143,11 @@ public abstract class ScoreProcessor<TObject> : ScoreProcessor
/// </summary>
protected readonly List<Judgement> Judgements = new List<Judgement>();
private int maxHits;
private int maxCombo;
private int hits;
protected ScoreProcessor()
{
}
@ -154,6 +159,10 @@ protected ScoreProcessor(RulesetContainer<TObject> rulesetContainer)
rulesetContainer.OnJudgement += AddJudgement;
ComputeTargets(rulesetContainer.Beatmap);
maxCombo = HighestCombo;
maxHits = hits;
Reset();
}
@ -173,8 +182,6 @@ protected void AddJudgement(Judgement judgement)
{
switch (judgement.Result)
{
case HitResult.None:
break;
case HitResult.Miss:
Combo.Value = 0;
break;
@ -184,6 +191,9 @@ protected void AddJudgement(Judgement judgement)
}
}
if (judgement.AffectsCombo && judgement.IsHit)
hits++;
Judgements.Add(judgement);
OnNewJudgement(judgement);