mirror of
https://github.com/osukey/osukey.git
synced 2025-05-24 23:17:25 +09: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
|
where TObject : HitObject
|
||||||
{
|
{
|
||||||
private const double base_portion = 0.3;
|
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);
|
Debug.Assert(base_portion + combo_portion == 1.0);
|
||||||
|
|
||||||
@ -180,11 +180,20 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
|
|
||||||
SimulateAutoplay(rulesetContainer.Beatmap);
|
SimulateAutoplay(rulesetContainer.Beatmap);
|
||||||
Reset(true);
|
Reset(true);
|
||||||
|
|
||||||
|
if (maxBaseScore == 0 || maxHighestCombo == 0)
|
||||||
|
{
|
||||||
|
Mode.Value = ScoringMode.Exponential;
|
||||||
|
Mode.Disabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Simulates an autoplay of <see cref="HitObject"/>s that will be judged by this <see cref="ScoreProcessor{TObject}"/>
|
/// 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}"/>.
|
/// 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>
|
/// </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>
|
/// <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) { }
|
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 sealed override bool ProvidingUserCursor => !HasReplayLoaded && Playfield.ProvidingUserCursor;
|
||||||
|
|
||||||
|
public override ScoreProcessor CreateScoreProcessor() => new ScoreProcessor<TObject>(this);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The playfield.
|
/// The playfield.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user