This commit is contained in:
djkellerman
2025-02-26 23:09:27 -05:00
parent 341e481ab4
commit b21efcd1eb

View File

@@ -6,13 +6,19 @@ public class HealthBar : MonoBehaviour
public Slider slider; public Slider slider;
public void SetMaxHealth(float health) public void SetMaxHealth(float health)
{
if (slider != null)
{ {
slider.maxValue = health; slider.maxValue = health;
slider.value = health; slider.value = health;
} }
}
public void SetHealth(float health) public void SetHealth(float health)
{
if (slider != null)
{ {
slider.value = health; slider.value = health;
} }
}
} }