gmtk-2024/scripts/menu.gd

14 lines
353 B
GDScript

extends Control
@onready var start_button = $StartButton
@onready var exit_button = $ExitButton
func _ready() -> void:
start_button.button_down.connect(start_game)
exit_button.button_down.connect(exit_game)
func start_game() -> void:
get_tree().change_scene_to_file("res://levels/level1/stage1.tscn")
func exit_game() -> void:
get_tree().quit()