13 lines
326 B
GDScript
13 lines
326 B
GDScript
extends Node
|
|
|
|
func _ready():
|
|
$Buttons/PlayButton.grab_focus()
|
|
for button in $Buttons.get_children():
|
|
button.connect('pressed', self, '_on_Button_pressed', [button.scene_to_load])
|
|
|
|
func _on_Button_pressed(scene_to_load : String):
|
|
if scene_to_load != "":
|
|
get_tree().change_scene(scene_to_load)
|
|
else:
|
|
get_tree().quit()
|