Improved component system

This commit is contained in:
2024-02-07 23:04:19 +01:00
parent 97087ad03e
commit c4a9da0880
22 changed files with 263 additions and 188 deletions

View File

@ -2,10 +2,11 @@ class_name HealthComponent
extends Node
@export var max_health: float
var health: float
func _ready():
pass
health = max_health
func take_damage(attack: Attack):
health -= attack.damage