mirror of
https://github.com/ppy/osu
synced 2025-01-04 05:12:10 +00:00
Add default implementation for ScoreProcessor using Exponential scoring
This commit is contained in:
parent
e146bcacf1
commit
f1130eb899
@ -148,7 +148,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class ScoreProcessor<TObject> : ScoreProcessor
|
||||
public class ScoreProcessor<TObject> : ScoreProcessor
|
||||
where TObject : HitObject
|
||||
{
|
||||
private const double base_portion = 0.3;
|
||||
@ -172,7 +172,7 @@ namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
}
|
||||
|
||||
protected ScoreProcessor(RulesetContainer<TObject> rulesetContainer)
|
||||
public ScoreProcessor(RulesetContainer<TObject> rulesetContainer)
|
||||
{
|
||||
Debug.Assert(base_portion + combo_portion == 1.0);
|
||||
|
||||
@ -180,11 +180,20 @@ namespace osu.Game.Rulesets.Scoring
|
||||
|
||||
SimulateAutoplay(rulesetContainer.Beatmap);
|
||||
Reset(true);
|
||||
|
||||
if (maxBaseScore == 0 || maxHighestCombo == 0)
|
||||
{
|
||||
Mode.Value = ScoringMode.Exponential;
|
||||
Mode.Disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Simulates an autoplay of <see cref="HitObject"/>s that will be judged by this <see cref="ScoreProcessor{TObject}"/>
|
||||
/// by adding <see cref="Judgement"/>s for each <see cref="HitObject"/> in the <see cref="Beatmap{TObject}"/>.
|
||||
/// <para>
|
||||
/// This is required for <see cref="ScoringMode.Standardised"/> to work, otherwise <see cref="ScoringMode.Exponential"/> will be used.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="beatmap">The <see cref="Beatmap{TObject}"/> containing the <see cref="HitObject"/>s that will be judged by this <see cref="ScoreProcessor{TObject}"/>.</param>
|
||||
protected virtual void SimulateAutoplay(Beatmap<TObject> beatmap) { }
|
||||
|
@ -133,6 +133,8 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
public sealed override bool ProvidingUserCursor => !HasReplayLoaded && Playfield.ProvidingUserCursor;
|
||||
|
||||
public override ScoreProcessor CreateScoreProcessor() => new ScoreProcessor<TObject>(this);
|
||||
|
||||
/// <summary>
|
||||
/// The playfield.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user