mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Bind every HealthDisplay on Player load
This commit is contained in:
@ -25,6 +25,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
public FaillingLayer()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Child = box = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
@ -13,5 +14,10 @@ namespace osu.Game.Screens.Play.HUD
|
||||
MinValue = 0,
|
||||
MaxValue = 1
|
||||
};
|
||||
|
||||
public virtual void BindHealthProcessor(HealthProcessor processor)
|
||||
{
|
||||
Current.BindTo(processor.Health);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
using osu.Game.Screens.Ranking;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Users;
|
||||
@ -184,6 +185,9 @@ namespace osu.Game.Screens.Play
|
||||
foreach (var mod in Mods.Value.OfType<IApplicableToHealthProcessor>())
|
||||
mod.ApplyToHealthProcessor(HealthProcessor);
|
||||
|
||||
foreach (var overlay in DrawableRuleset.Overlays.OfType<HealthDisplay>())
|
||||
overlay.BindHealthProcessor(HealthProcessor);
|
||||
|
||||
BreakOverlay.IsBreakTime.BindValueChanged(onBreakTimeChanged, true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user