add health component and FollowTarget Enemy Controller and minor changes

This commit is contained in:
2026-05-20 19:31:29 +01:00
parent bceb6c6df8
commit 962bc016a3
9 changed files with 56 additions and 5 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
class_name HurtBox extends Area2D
signal damage_recieved(damage:float)
@export_flags("player","enemy") var type
@export_flags("player","enemy") var respond_from
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -13,6 +13,6 @@ func _process(delta: float) -> void:
pass
func on_damage_receieved(hitbox:HitBox):
if hitbox.affect & type:
if hitbox.damage_type & respond_from:
damage_recieved.emit(hitbox.damage)
#if type