Add spaceship exit component, enemy wave trigger, and update various scene properties

This commit is contained in:
2025-05-25 20:10:48 +02:00
parent bac0a8c5f7
commit 37b96c0f11
11 changed files with 286 additions and 21 deletions

View File

@@ -0,0 +1,21 @@
class_name SpaceshipExitComponent
extends Node
@export var area2d: Area2D
signal spaceship_exited
func _ready() -> void:
if not area2d:
printerr("SpaceshipExitComponent: area2d is not set.")
return
area2d.body_entered.connect(_on_area2d_body_entered)
func _on_area2d_body_entered(body: Node2D) -> void:
if not body is PlayerController:
printerr("SpaceshipExitComponent: body is not a PlayerController.")
return
print("SpaceshipExitComponent: PlayerController exited spaceship.")
spaceship_exited.emit()