This commit is contained in:
Marek Lenczewski
2026-04-02 18:33:53 +02:00
parent 47f4fe3d90
commit c7e6f8f4b5
25 changed files with 301 additions and 157 deletions

View File

@@ -32,5 +32,6 @@ func _on_detection_area_body_entered(body: Node3D) -> void:
if body is CharacterBody3D and body.name == "Player":
EventBus.enemy_detected.emit(self, body)
func _on_detection_area_body_exited(_body: Node3D) -> void:
pass
func _on_detection_area_body_exited(body: Node3D) -> void:
if body is CharacterBody3D and body.name == "Player":
EventBus.enemy_lost.emit(self, body)

View File

@@ -34,7 +34,7 @@ height = 1.0
material = SubResource("StandardMaterial3D_1")
[sub_resource type="SphereShape3D" id="SphereShape3D_1"]
radius = 8.0
radius = 10.0
[node name="Enemy" type="CharacterBody3D"]
script = ExtResource("1")