mirror of
https://github.com/ppy/osu
synced 2024-12-12 09:58:22 +00:00
Bind to method instead of exposing ScoreProcessor to HealthDisplay.
This commit is contained in:
parent
3acdc1dcfb
commit
7df35e1197
@ -93,12 +93,7 @@ namespace osu.Game.Rulesets.UI
|
||||
};
|
||||
}
|
||||
|
||||
public void BindProcessor(ScoreProcessor processor)
|
||||
{
|
||||
processor.NewJudgement += onNewJudgement;
|
||||
}
|
||||
|
||||
private void onNewJudgement(Judgement judgement)
|
||||
public void Flash(Judgement judgement)
|
||||
{
|
||||
if (judgement.Result == HitResult.Miss)
|
||||
return;
|
||||
|
@ -84,7 +84,8 @@ namespace osu.Game.Rulesets.UI
|
||||
base.BindProcessor(processor);
|
||||
|
||||
var shd = HealthDisplay as StandardHealthDisplay;
|
||||
shd?.BindProcessor(processor);
|
||||
if (shd != null)
|
||||
processor.NewJudgement += shd.Flash;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user