// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Bindables; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.UI; namespace osu.Game.Screens.Play.HUD { /// /// A container for components displaying the current player health. /// Gets bound automatically to the when inserted to hierarchy. /// public abstract class HealthDisplay : Container { public readonly BindableDouble Current = new BindableDouble { MinValue = 0, MaxValue = 1 }; /// /// Bind the tracked fields of to this health display. /// /// public void BindHealthProcessor(HealthProcessor processor) { Current.BindTo(processor.Health); } } }