31 lines
751 B
GDScript3
31 lines
751 B
GDScript3
|
|
extends Control
|
||
|
|
|
||
|
|
@onready var btn_new: Button = $Center/V/BtnNew
|
||
|
|
@onready var btn_continue: Button = $Center/V/BtnContinue
|
||
|
|
@onready var btn_quit: Button = $Center/V/BtnQuit
|
||
|
|
|
||
|
|
|
||
|
|
func _ready() -> void:
|
||
|
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||
|
|
GameState.reset()
|
||
|
|
DialogManager.set_crosshair_visible(false)
|
||
|
|
DialogManager.set_controls_hint("")
|
||
|
|
DialogManager.set_date_time("", "")
|
||
|
|
DialogManager.set_objective("")
|
||
|
|
btn_new.pressed.connect(_on_new_game)
|
||
|
|
btn_quit.pressed.connect(_on_quit)
|
||
|
|
btn_new.grab_focus()
|
||
|
|
|
||
|
|
|
||
|
|
func _on_new_game() -> void:
|
||
|
|
SceneManager.go_room()
|
||
|
|
|
||
|
|
|
||
|
|
func _on_quit() -> void:
|
||
|
|
get_tree().quit()
|
||
|
|
|
||
|
|
|
||
|
|
func _input(event: InputEvent) -> void:
|
||
|
|
if event is InputEventKey and event.pressed and event.keycode == KEY_ESCAPE:
|
||
|
|
get_tree().quit()
|