First_Person_Slapper/Spatial.gd
MarcEricMartel fc908460f6 lvl9
2022-10-12 20:13:11 -04:00

24 lines
448 B
GDScript3

extends Spatial
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
onready var Timer = $Timer
var stop = false;
# Called when the node enters the scene tree for the first time.
func _ready():
Timer.start()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _input(event):
if event is InputEventKey and event.pressed:
if stop:
get_tree().quit()
func _on_Timer_timeout():
stop = true