update game_menu
This commit is contained in:
@@ -1,29 +1,36 @@
|
||||
extends Control
|
||||
|
||||
@onready var play_button: TextureButton = $%PlayButton
|
||||
@onready var resume_button: TextureButton = $%ResumeButton
|
||||
@onready var play_button: Control = $%PlayButton
|
||||
@onready var resume_button: Control = $%ResumeButton
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
GameState.on_game_paused.connect(_on_game_paused)
|
||||
GameState.on_game_resumed.connect(_on_game_resumed)
|
||||
resume_button.hide()
|
||||
|
||||
func _on_play_button_pressed() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
func _on_resume_button_pressed() -> void:
|
||||
GameState.resume_game()
|
||||
|
||||
func _on_save_button_pressed() -> void:
|
||||
GameState.save_game()
|
||||
|
||||
func _on_quit_button_pressed() -> void:
|
||||
GameState.quit_game()
|
||||
|
||||
func _on_game_paused() -> void:
|
||||
play_button.hide()
|
||||
resume_button.show()
|
||||
|
||||
|
||||
func _on_game_resumed() -> void:
|
||||
play_button.show()
|
||||
resume_button.hide()
|
||||
|
||||
|
||||
func _on_play_button_on_button_pressed() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_resume_button_on_button_pressed() -> void:
|
||||
GameState.resume_game()
|
||||
|
||||
|
||||
func _on_save_button_on_button_pressed() -> void:
|
||||
GameState.save_game()
|
||||
|
||||
|
||||
func _on_quit_button_on_button_pressed() -> void:
|
||||
GameState.quit_game()
|
||||
|
||||
Reference in New Issue
Block a user