1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +08:00

Fix incorrect event unbind logic

This commit is contained in:
Dean Herbert 2021-12-21 13:05:26 +09:00
parent 52db7b36fc
commit edcbd4de6d

View File

@ -40,10 +40,12 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
if (gameplayClockContainer != null)
gameplayClockContainer.OnSeek += Clear;
// Scheduled as meter implementations are likely going to change/add drawables when reacting to this.
processor.NewJudgement += j => Schedule(() => OnNewJudgement(j));
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));
/// <summary>
/// Fired when a new judgement arrives.
/// </summary>
@ -89,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;