Raise-Your-Wand/Scripts/healthBar.gd
nc5432 8fce25f619 Fixed major spellcasting bug
- The player and enemy were using a cast progress variable that was part of the spell object, so they were altering it at the same time
2024-05-13 18:32:10 -04:00

8 lines
191 B
GDScript

class_name HealthBar extends Control
@onready var bar: ColorRect = $ColorRect2
@export var maxHealth: float = 1
func healthChanged(health) -> void:
bar.size.y = (health / maxHealth) * 100