gmtk-2024/scripts/menu.gd

15 lines
353 B
GDScript3
Raw Permalink Normal View History

2024-08-18 17:12:13 +00:00
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()