13 lines
301 B
GDScript3
13 lines
301 B
GDScript3
|
extends Node2D
|
||
|
|
||
|
|
||
|
func _on_trigger_fired(intent: Variant, body: PhysicsBody2D) -> void:
|
||
|
print("Game controller knows %s trigger fired " % intent)
|
||
|
match intent:
|
||
|
"destroy":
|
||
|
print("Destroy this thing!")
|
||
|
if body is RigidBody2D:
|
||
|
body.queue_free()
|
||
|
"powerup":
|
||
|
print("Power this thing up!")
|