1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 08:22:56 +08:00

Reorder HitErrorDisplay

This commit is contained in:
smoogipoo 2019-08-30 19:47:21 +09:00
parent 6fb8a6cdbe
commit dfccc60361

View File

@ -35,18 +35,6 @@ namespace osu.Game.Screens.Play.HUD
processor.NewJudgement += onNewJudgement; processor.NewJudgement += onNewJudgement;
} }
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
processor.NewJudgement -= onNewJudgement;
}
private void onNewJudgement(JudgementResult result)
{
foreach (var c in Children)
c.OnNewJudgement(result);
}
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuConfigManager config) private void load(OsuConfigManager config)
{ {
@ -59,6 +47,12 @@ namespace osu.Game.Screens.Play.HUD
type.BindValueChanged(typeChanged, true); type.BindValueChanged(typeChanged, true);
} }
private void onNewJudgement(JudgementResult result)
{
foreach (var c in Children)
c.OnNewJudgement(result);
}
private void typeChanged(ValueChangedEvent<ScoreMeterType> type) private void typeChanged(ValueChangedEvent<ScoreMeterType> type)
{ {
Children.ForEach(c => c.FadeOut(fade_duration, Easing.OutQuint)); Children.ForEach(c => c.FadeOut(fade_duration, Easing.OutQuint));
@ -96,5 +90,11 @@ namespace osu.Game.Screens.Play.HUD
Add(display); Add(display);
display.FadeInFromZero(fade_duration, Easing.OutQuint); display.FadeInFromZero(fade_duration, Easing.OutQuint);
} }
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
processor.NewJudgement -= onNewJudgement;
}
} }
} }