add health component and FollowTarget Enemy Controller and minor changes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user