Jam10/Scenes/Title_Screen.gd

17 lines
389 B
GDScript3
Raw Normal View History

2023-01-30 01:14:42 +00:00
extends Control
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
for button in $Menu/CenterRow/Buttons.get_children():
button.connect("pressed", self, "_on_Button_pressed", [button.scene_to_load])
func _on_Button_pressed(scene_to_load):
get_tree().change_scene(scene_to_load)