1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Bind to method instead of exposing ScoreProcessor to HealthDisplay.

This commit is contained in:
smoogipooo 2017-04-20 19:45:15 +09:00
parent 3acdc1dcfb
commit 7df35e1197
2 changed files with 3 additions and 7 deletions

View File

@ -93,12 +93,7 @@ namespace osu.Game.Rulesets.UI
}; };
} }
public void BindProcessor(ScoreProcessor processor) public void Flash(Judgement judgement)
{
processor.NewJudgement += onNewJudgement;
}
private void onNewJudgement(Judgement judgement)
{ {
if (judgement.Result == HitResult.Miss) if (judgement.Result == HitResult.Miss)
return; return;

View File

@ -84,7 +84,8 @@ namespace osu.Game.Rulesets.UI
base.BindProcessor(processor); base.BindProcessor(processor);
var shd = HealthDisplay as StandardHealthDisplay; var shd = HealthDisplay as StandardHealthDisplay;
shd?.BindProcessor(processor); if (shd != null)
processor.NewJudgement += shd.Flash;
} }
} }
} }