lose screen gui working well

This commit is contained in:
Clevertop 2024-08-11 10:53:26 +10:00
parent d2dfb65d59
commit bfaef2f33f
3 changed files with 68 additions and 8 deletions

View file

@ -1,13 +1,26 @@
extends Control
@export_group("Node References")
@export var lose_panel : PanelContainer
@export var lose_label : Label
@export var reset_label : Label
# Called when the node enters the scene tree for the first time.
func _ready():
lose_panel.visible = false
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func show_lose_screen(lose_text : String, reset_timer : float):
lose_panel.visible = true
if lose_text != "":
lose_label.text = lose_text
reset_label.text = "Resetting in: " + str(round(reset_timer*10)/10)
func hide_lose_screen():
lose_panel.visible = false
pass