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")