diff --git a/osu.Game/Screens/Play/HUD/HitErrorMeters/HitErrorMeter.cs b/osu.Game/Screens/Play/HUD/HitErrorMeters/HitErrorMeter.cs index c7b06a3a2c..1f08cb8aa7 100644 --- a/osu.Game/Screens/Play/HUD/HitErrorMeters/HitErrorMeter.cs +++ b/osu.Game/Screens/Play/HUD/HitErrorMeters/HitErrorMeter.cs @@ -40,9 +40,16 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters if (gameplayClockContainer != null) gameplayClockContainer.OnSeek += Clear; - processor.NewJudgement += OnNewJudgement; + processor.NewJudgement += processorNewJudgement; } + // Scheduled as meter implementations are likely going to change/add drawables when reacting to this. + private void processorNewJudgement(JudgementResult j) => Schedule(() => OnNewJudgement(j)); + + /// + /// Fired when a new judgement arrives. + /// + /// The new judgement. protected abstract void OnNewJudgement(JudgementResult judgement); protected Color4 GetColourForHitResult(HitResult result) @@ -84,7 +91,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters base.Dispose(isDisposing); if (processor != null) - processor.NewJudgement -= OnNewJudgement; + processor.NewJudgement -= processorNewJudgement; if (gameplayClockContainer != null) gameplayClockContainer.OnSeek -= Clear;