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)
{
processor.NewJudgement += onNewJudgement;
}
private void onNewJudgement(Judgement judgement)
public void Flash(Judgement judgement)
{
if (judgement.Result == HitResult.Miss)
return;

View File

@ -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;
}
}
}