Initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
extends Control
|
||||
|
||||
@onready var new_game_button: Button = $CenterRoot/MenuColumn/NewGameButton
|
||||
@onready var continue_button: Button = $CenterRoot/MenuColumn/ContinueButton
|
||||
@onready var quit_button: Button = $CenterRoot/MenuColumn/QuitButton
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
if new_game_button:
|
||||
new_game_button.pressed.connect(_on_new_game)
|
||||
if continue_button:
|
||||
continue_button.pressed.connect(_on_continue)
|
||||
if quit_button:
|
||||
quit_button.pressed.connect(_on_quit)
|
||||
if continue_button:
|
||||
continue_button.disabled = not GameState.has_save
|
||||
|
||||
|
||||
func _on_new_game() -> void:
|
||||
get_tree().change_scene_to_file("res://Scenes/character_creation.tscn")
|
||||
|
||||
|
||||
func _on_continue() -> void:
|
||||
Engine.set_meta("load_save", true)
|
||||
get_tree().change_scene_to_file("res://Scenes/main.tscn")
|
||||
|
||||
|
||||
func _on_quit() -> void:
|
||||
get_tree().quit()
|
||||
Reference in New Issue
Block a user