mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Move AllObjectsJudged into ScoreProcessor as AllJudged
Changes to OsuScoreProcessor were required to make sure that ticks and slider heads weren't ignored.
This commit is contained in:
@ -14,11 +14,17 @@ namespace osu.Game.Rulesets.Scoring
|
||||
public abstract class ScoreProcessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Invoked when the ScoreProcessor is in a failed state.
|
||||
/// Invoked when the <see cref="ScoreProcessor"/> is in a failed state.
|
||||
/// This may occur regardless of whether an <see cref="AllJudged"/> event is invoked.
|
||||
/// Return true if the fail was permitted.
|
||||
/// </summary>
|
||||
public event Func<bool> Failed;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when all <see cref="HitObject"/>s have been judged.
|
||||
/// </summary>
|
||||
public event Action AllJudged;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a new judgement has occurred. This occurs after the judgement has been processed by the <see cref="ScoreProcessor"/>.
|
||||
/// </summary>
|
||||
@ -49,6 +55,11 @@ namespace osu.Game.Rulesets.Scoring
|
||||
/// </summary>
|
||||
public readonly BindableInt HighestCombo = new BindableInt();
|
||||
|
||||
/// <summary>
|
||||
/// Whether all <see cref="Judgement"/>s have been processed.
|
||||
/// </summary>
|
||||
protected virtual bool HasCompleted => false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the score is in a failed state.
|
||||
/// </summary>
|
||||
@ -117,6 +128,9 @@ namespace osu.Game.Rulesets.Scoring
|
||||
protected void NotifyNewJudgement(Judgement judgement)
|
||||
{
|
||||
NewJudgement?.Invoke(judgement);
|
||||
|
||||
if (HasCompleted)
|
||||
AllJudged?.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -141,6 +155,8 @@ namespace osu.Game.Rulesets.Scoring
|
||||
|
||||
public readonly Bindable<ScoringMode> Mode = new Bindable<ScoringMode>(ScoringMode.Exponential);
|
||||
|
||||
protected sealed override bool HasCompleted => Hits == MaxHits;
|
||||
|
||||
protected virtual double ComboPortion => 0.5f;
|
||||
protected virtual double AccuracyPortion => 0.5f;
|
||||
|
||||
|
Reference in New Issue
Block a user