19 lines
444 B
GDScript3
19 lines
444 B
GDScript3
|
|
extends Node2D
|
||
|
|
|
||
|
|
|
||
|
|
# Called when the node enters the scene tree for the first time.
|
||
|
|
func _ready() -> void:
|
||
|
|
get_window().grab_focus()
|
||
|
|
|
||
|
|
|
||
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||
|
|
func _process(delta: float) -> void:
|
||
|
|
pass
|
||
|
|
|
||
|
|
|
||
|
|
func on_trigger(body: Variant, intentMessage: Variant) -> void:
|
||
|
|
print("hello")
|
||
|
|
if not body is Player and intentMessage == "destroy":
|
||
|
|
if intentMessage == "destroy":
|
||
|
|
body.queue_free()
|