2024-05-07 21:43:09 -04:00
|
|
|
class_name HealthBar extends Control
|
|
|
|
|
|
|
|
@onready var bar: ColorRect = $ColorRect2
|
|
|
|
@export var maxHealth: float = 1
|
|
|
|
|
2024-05-09 22:21:58 -04:00
|
|
|
func healthChanged(health) -> void:
|
2024-05-07 21:43:09 -04:00
|
|
|
bar.size.y = (health / maxHealth) * 100
|