Added debug labels

This commit is contained in:
2024-01-18 23:35:17 +01:00
parent 7eba25c83b
commit ce699ee6db
22 changed files with 256 additions and 108 deletions

View File

@ -0,0 +1,14 @@
class_name HealthComponent
extends Node
@export var max_health: float
var health: float
func _ready():
pass
func take_damage(attack: Attack):
health -= attack.damage
if health <= 0:
get_parent().queue_free()