This commit is contained in:
MarkYabut committed 2026-10-06 19:44:18 -04:00
1 parent fb92181e53
commit 8768909429
9 files changed
+115 -60

No files matched your search

+12 -6
View File
@@ -1,6 +1,7 @@
extends Node2D
class_name GameController extends Node2D
signal teleportSignal(body)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
@@ -12,7 +13,12 @@ func _process(delta: float) -> void:
func _on_trigger(effect: Variant, Object: Variant) -> void:
print("GC knows about trigger")
if effect == "destroy":
if not Object is Player:
Object.queue_free()
print("GC knows about trigger: " + effect)
match effect:
"destroy":
if not Object is Player:
Object.queue_free()
"teleport":
print("Trigger wants to teleport")
if Object is Crate:
teleportSignal.emit(Object)