24 lines
448 B
GDScript3
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
|