blob: 2420fc89385fdaacf44df47cc472b1d15c591f7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
class_name LevelMainMenu
extends Node2D
@onready var root: Root = get_tree().root.get_child(0)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$TestLevelButton.grab_focus.call_deferred()
$TestLevelButton.pressed.connect(_test_level_button_pressed)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
pass
func _test_level_button_pressed():
root.change_level("test")
|