20 lines
401 B
GDScript
20 lines
401 B
GDScript
extends Node2D
|
|
|
|
onready var start_button = $TextureButton
|
|
|
|
func _ready():
|
|
start_button.connect("pressed", self, "start_game")
|
|
|
|
func _process(_delta):
|
|
var t = Timer.new()
|
|
t.set_wait_time(.1)
|
|
t.set_one_shot(true)
|
|
self.add_child(t)
|
|
t.start()
|
|
yield(t, "timeout")
|
|
if Input.is_action_just_pressed("ui_accept") == true:
|
|
start_game()
|
|
|
|
func start_game():
|
|
get_tree().change_scene("res://Level.tscn")
|