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

19 lines
417 B
GDScript3
Raw 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)
2024-08-19 01:44:16 +00:00
if OS.has_feature("web"):
exit_button.queue_free()
else:
exit_button.button_down.connect(exit_game)
2024-08-18 17:12:13 +00:00
func start_game() -> void:
get_tree().change_scene_to_file("res://levels/level1/stage1.tscn")
func exit_game() -> void:
get_tree().quit()