-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwin_menu.gd
More file actions
33 lines (23 loc) · 815 Bytes
/
win_menu.gd
File metadata and controls
33 lines (23 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
extends CanvasLayer
func _on_retry_pressed() -> void:
self.hide()
$"../LevelManager".retry(true, true)
func _on_next_pressed() -> void:
match $PanelContainer/VBoxContainer/HBoxContainer/Next.text:
"Main Menu":
self.hide()
GameManager.back_to_menu()
"Next Level":
self.hide()
GameManager.next_level()
func _on_visibility_changed() -> void:
$PanelContainer/VBoxContainer/TimeLabel.text = "Time: " + $"../UI/SpeedrunTimer".text
$PanelContainer/VBoxContainer/DeathsLabel.text = "Deaths: " + str($"..".level_deaths)
func show_last() -> void:
show()
$AnimationPlayer.play("popup")
$PanelContainer/VBoxContainer/HBoxContainer/Next.text = "Main Menu"
func show_normal() -> void:
show()
$AnimationPlayer.play("popup")
$PanelContainer/VBoxContainer/HBoxContainer/Next.text = "Next Level"