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:
parent
6a88b8888b
commit
b54eb56169
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user