Functional prototype
This commit is contained in:
19
core/scripts/main_menu.gd
Normal file
19
core/scripts/main_menu.gd
Normal file
@@ -0,0 +1,19 @@
|
||||
extends Control
|
||||
|
||||
@export var start_button: Button
|
||||
@export var quit_button: Button
|
||||
|
||||
|
||||
func _ready():
|
||||
start_button.pressed.connect(_on_start_button_pressed)
|
||||
quit_button.pressed.connect(_on_quit_button_pressed)
|
||||
start_button.grab_focus()
|
||||
|
||||
|
||||
func _on_start_button_pressed():
|
||||
hide()
|
||||
GameManager.start_game()
|
||||
|
||||
|
||||
func _on_quit_button_pressed():
|
||||
get_tree().quit()
|
||||
Reference in New Issue
Block a user