mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 22:22:54 +08:00
Move Schedule
call to base implementation of error meter for extra safety
This commit is contained in:
parent
28d6ff5d9c
commit
52db7b36fc
@ -53,13 +53,13 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
||||
LayoutEasing = Easing.OutQuint;
|
||||
}
|
||||
|
||||
public void Push(Color4 colour) => Schedule(() =>
|
||||
public void Push(Color4 colour)
|
||||
{
|
||||
Add(new HitErrorCircle(colour, drawable_judgement_size));
|
||||
|
||||
if (Children.Count > max_available_judgements)
|
||||
Children.FirstOrDefault(c => !c.IsRemoved)?.Remove();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
internal class HitErrorCircle : Container
|
||||
|
@ -40,9 +40,14 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
||||
if (gameplayClockContainer != null)
|
||||
gameplayClockContainer.OnSeek += Clear;
|
||||
|
||||
processor.NewJudgement += OnNewJudgement;
|
||||
// Scheduled as meter implementations are likely going to change/add drawables when reacting to this.
|
||||
processor.NewJudgement += j => Schedule(() => OnNewJudgement(j));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fired when a new judgement arrives.
|
||||
/// </summary>
|
||||
/// <param name="judgement">The new judgement.</param>
|
||||
protected abstract void OnNewJudgement(JudgementResult judgement);
|
||||
|
||||
protected Color4 GetColourForHitResult(HitResult result)
|
||||
|
Loading…
Reference in New Issue
Block a user