GameOverScript

 avatar
TaktycznyBocian
plain_text
2 years ago
296 B
2
Indexable
Never
extends Node2D

var seconds = 5

onready var timer = get_node('Timer')

func _ready():
	timer.set_wait_time(1)
	timer.start()

func _on_Timer_timeout():
	seconds -= 1
	get_node('Time').set_text(str(seconds))
	if seconds == -1:
		get_tree().change_scene('res://Levels/Level1.tscn')