big 4 objects, custom signal, game controller

This commit is contained in:
RudyIm committed 2025-09-29 21:11:01 -04:00
commit afe089fdcd
16 files changed
+261

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_trigger_fired(intent: Variant, body) -> void:
print("GC knows trigger fired " +intent)
match intent:
"destroy":
print("destroy this thing")
body.queue_free()
"powerup":
print("power up this thing")
+1
View File
@@ -0,0 +1 @@
uid://c546prectbgc7
+15
View File
@@ -0,0 +1,15 @@
extends Area2D
@export var intent = "destroy"
signal triggerFiredSignal(intent, body)
func _ready():
pass
func _process(delta):
pass
func _on_body_entered(body):
print("trigger fired")
triggerFiredSignal.emit(intent, body)
+1
View File
@@ -0,0 +1 @@
uid://pxfi4acsyvl0