its game over WIP
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
extends Control
|
||||
|
||||
@onready var background = $Background
|
||||
@onready var back_to_menu = $UI/HBoxContainer/BackToMainMenu
|
||||
@onready var reload_checkpoint = $UI/HBoxContainer/ReloadCheckpoint
|
||||
@onready var message = $UI/Message
|
||||
@onready var animation_player = $AnimationPlayer
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
||||
#Hiding everything
|
||||
hide()
|
||||
for node in [background, back_to_menu, reload_checkpoint, message]:
|
||||
node.hide()
|
||||
|
||||
|
||||
|
||||
#Reveals the game over screen
|
||||
func reveal():
|
||||
|
||||
#Reveals the background image first
|
||||
show()
|
||||
background.show()
|
||||
background.reveal_spray()
|
||||
await background.reveal_done
|
||||
|
||||
#Reveals the text and buttons afterwards
|
||||
for node in [message, back_to_menu, reload_checkpoint]:
|
||||
node.modulate.a = 0.0
|
||||
node.show()
|
||||
animation_player.play("fade_in")
|
||||
|
||||
Reference in New Issue
Block a user