update
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
extends StaticBody3D
|
||||
|
||||
func _ready() -> void:
|
||||
add_to_group("targetable")
|
||||
add_to_group("portals")
|
||||
EventBus.entity_died.connect(_on_entity_died)
|
||||
|
||||
func _on_entity_died(entity: Node) -> void:
|
||||
if entity == self:
|
||||
queue_free()
|
||||
|
||||
func _on_detection_area_body_entered(body: Node3D) -> void:
|
||||
if body is CharacterBody3D and body.name == "Player":
|
||||
EventBus.enemy_engaged.emit(self, body)
|
||||
|
||||
Reference in New Issue
Block a user