1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 05:42:56 +08:00

Move new judgement binding to LoadComplete to ensure containers are loaded

This commit is contained in:
Dean Herbert 2021-05-10 22:34:24 +09:00
parent 6a88b8888b
commit b54eb56169

View File

@ -37,8 +37,6 @@ namespace osu.Game.Screens.Play.HUD
{
Current.BindTo(HealthProcessor.Health);
HealthProcessor.NewJudgement += onNewJudgement;
if (hud != null)
{
showHealthbar = hud.ShowHealthbar.GetBoundCopy();
@ -46,6 +44,13 @@ namespace osu.Game.Screens.Play.HUD
}
}
protected override void LoadComplete()
{
base.LoadComplete();
HealthProcessor.NewJudgement += onNewJudgement;
}
private void onNewJudgement(JudgementResult judgement)
{
if (judgement.IsHit && judgement.Type != HitResult.IgnoreHit)