mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Move more properties to the base class
This commit is contained in:
@ -11,6 +11,16 @@ namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
public abstract class JudgementProcessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Invoked when all <see cref="HitObject"/>s have been judged by this <see cref="JudgementProcessor"/>.
|
||||
/// </summary>
|
||||
public event Action AllJudged;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a new judgement has occurred. This occurs after the judgement has been processed by this <see cref="JudgementProcessor"/>.
|
||||
/// </summary>
|
||||
public event Action<JudgementResult> NewJudgement;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of hits that can be judged.
|
||||
/// </summary>
|
||||
@ -21,6 +31,11 @@ namespace osu.Game.Rulesets.Scoring
|
||||
/// </summary>
|
||||
public int JudgedHits { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether all <see cref="Judgement"/>s have been processed.
|
||||
/// </summary>
|
||||
public bool HasCompleted => JudgedHits == MaxHits;
|
||||
|
||||
protected JudgementProcessor(IBeatmap beatmap)
|
||||
{
|
||||
ApplyBeatmap(beatmap);
|
||||
@ -47,6 +62,11 @@ namespace osu.Game.Rulesets.Scoring
|
||||
JudgedHits++;
|
||||
|
||||
ApplyResultInternal(result);
|
||||
|
||||
NewJudgement?.Invoke(result);
|
||||
|
||||
if (HasCompleted)
|
||||
AllJudged?.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user