Game2-WinCode

 avatar
TaktycznyBocian
plain_text
a year ago
294 B
0
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://UI/MainMenu.tscn")