40 lines
794 B
GDScript
40 lines
794 B
GDScript
class_name MainUI extends CanvasLayer
|
|
|
|
@export var options: Control
|
|
@export var game_over: GameOver
|
|
@export var pause: Control
|
|
@export var game_guide: Panel
|
|
@export var credits: Credits
|
|
|
|
|
|
|
|
func _ready() -> void:
|
|
UiManager.set_mainUI(self)
|
|
|
|
func show_opions_menu() -> void:
|
|
options.show()
|
|
|
|
func show_credits()->void:
|
|
credits.show()
|
|
credits.is_screen_active = true
|
|
|
|
func show_game_guide() -> void:
|
|
game_guide.is_active = true
|
|
game_guide.show()
|
|
|
|
func hide_game_guide() -> void:
|
|
game_guide.hide()
|
|
game_guide.is_active = false
|
|
|
|
func show_game_over_screen(text:String)->void:
|
|
game_over.set_game_over_label(text)
|
|
|
|
Global.game_scene.process_mode = Node.PROCESS_MODE_DISABLED
|
|
game_over.show()
|
|
|
|
func hide_pause_screen()->void:
|
|
pause.hide()
|
|
|
|
func show_pause_screen()->void:
|
|
pause.show()
|