mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 14:13:01 +08:00
Merge branch 'master' into fix-room-ordering
This commit is contained in:
commit
0908309232
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Rulesets.Osu.Judgements;
|
using osu.Game.Rulesets.Osu.Judgements;
|
||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
@ -72,5 +73,7 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override JudgementResult CreateResult(Judgement judgement) => new OsuJudgementResult(judgement);
|
protected override JudgementResult CreateResult(Judgement judgement) => new OsuJudgementResult(judgement);
|
||||||
|
|
||||||
|
protected override HitWindows CreateHitWindows() => new OsuHitWindows();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Online
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="timeBetweenPolls">The initial time in milliseconds to wait between polls. Setting to zero stops al polling.</param>
|
/// <param name="timeBetweenPolls">The initial time in milliseconds to wait between polls. Setting to zero stops all polling.</param>
|
||||||
protected PollingComponent(double timeBetweenPolls = 0)
|
protected PollingComponent(double timeBetweenPolls = 0)
|
||||||
{
|
{
|
||||||
TimeBetweenPolls = timeBetweenPolls;
|
TimeBetweenPolls = timeBetweenPolls;
|
||||||
|
@ -163,8 +163,6 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
AllJudged?.Invoke();
|
AllJudged?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly Dictionary<HitResult, int> scoreResultCounts = new Dictionary<HitResult, int>();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve a score populated with data for the current play this processor is responsible for.
|
/// Retrieve a score populated with data for the current play this processor is responsible for.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -180,9 +178,11 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
var hitWindows = CreateHitWindows();
|
var hitWindows = CreateHitWindows();
|
||||||
|
|
||||||
foreach (var result in Enum.GetValues(typeof(HitResult)).OfType<HitResult>().Where(r => r > HitResult.None && hitWindows.IsHitResultAllowed(r)))
|
foreach (var result in Enum.GetValues(typeof(HitResult)).OfType<HitResult>().Where(r => r > HitResult.None && hitWindows.IsHitResultAllowed(r)))
|
||||||
score.Statistics[result] = scoreResultCounts.GetOrDefault(result);
|
score.Statistics[result] = GetStatistic(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected abstract int GetStatistic(HitResult result);
|
||||||
|
|
||||||
public abstract double GetStandardisedScore();
|
public abstract double GetStandardisedScore();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,6 +378,8 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override int GetStatistic(HitResult result) => scoreResultCounts.GetOrDefault(result);
|
||||||
|
|
||||||
public override double GetStandardisedScore() => getScore(ScoringMode.Standardised);
|
public override double GetStandardisedScore() => getScore(ScoringMode.Standardised);
|
||||||
|
|
||||||
protected override void Reset(bool storeResults)
|
protected override void Reset(bool storeResults)
|
||||||
|
Loading…
Reference in New Issue
Block a user