ed-april-game/scripts/game_controller.gd

15 lines
438 B
GDScript3
Raw Normal View History

2026-04-21 01:09:00 +00:00
extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready():
get_window().grab_focus() # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_area_2d_trigger_active_signal(body, intentMessage):
print("game controller received trigger")
if intentMessage == "destroy" and not body is Player:
body.queue_free()