This commit is contained in:
2025-09-04 19:18:28 +02:00
parent 3f2ca68a4f
commit 6e599c8f1c
5 changed files with 30 additions and 26 deletions

View File

@@ -1,7 +1,8 @@
extends Node2D
@export var spawner: Node2D
func _body_entered_for_multiple(body: Node2D) -> void:
if body.is_in_group("asteroid") and body.get("is_firt_entree") == false:
spawner.spawn()
func _on_area_2d_body_exited(body: Node2D) -> void:
if body.is_in_group("asteroid"):
body.set_collision_layer(3)
body.set_collision_mask(3)