Move implementation to HUD

This commit is contained in:
Dean Herbert
2020-04-09 14:31:25 +09:00
parent 0e2d5213ce
commit 4976f80b71
6 changed files with 19 additions and 21 deletions

View File

@ -37,6 +37,7 @@ namespace osu.Game.Screens.Play
public readonly HitErrorDisplay HitErrorDisplay;
public readonly HoldForMenuButton HoldToQuit;
public readonly PlayerSettingsOverlay PlayerSettingsOverlay;
public readonly FailingLayer FailingLayer;
public Bindable<bool> ShowHealthbar = new Bindable<bool>(true);
@ -75,6 +76,7 @@ namespace osu.Game.Screens.Play
Children = new Drawable[]
{
FailingLayer = CreateFailingLayer(),
visibilityContainer = new Container
{
RelativeSizeAxes = Axes.Both,
@ -260,6 +262,8 @@ namespace osu.Game.Screens.Play
Margin = new MarginPadding { Top = 20 }
};
protected virtual FailingLayer CreateFailingLayer() => new FailingLayer();
protected virtual KeyCounterDisplay CreateKeyCounter() => new KeyCounterDisplay
{
Anchor = Anchor.BottomRight,
@ -304,7 +308,8 @@ namespace osu.Game.Screens.Play
protected virtual void BindHealthProcessor(HealthProcessor processor)
{
HealthDisplay?.Current.BindTo(processor.Health);
HealthDisplay?.BindHealthProcessor(processor);
FailingLayer?.BindHealthProcessor(processor);
}
}
}