This repository has been archived on 2024-08-28. You can view files and clone it, but cannot push or open issues or pull requests.
gmtk-2024/ui/main_menu.gd
2024-08-19 02:44:16 +01:00

18 lines
417 B
GDScript

extends Control
@onready var start_button = $StartButton
@onready var exit_button = $ExitButton
func _ready() -> void:
start_button.button_down.connect(start_game)
if OS.has_feature("web"):
exit_button.queue_free()
else:
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()