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:
parent
3acdc1dcfb
commit
7df35e1197
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user