We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d85e0b5 commit 286b878Copy full SHA for 286b878
game/src/UserInterface/UserInterface.gd
@@ -7,6 +7,8 @@ onready var pause_overlay: ColorRect = $PauseOverlay
7
onready var title_label: Label = $PauseOverlay/Title
8
onready var main_screen_button: Button = $PauseOverlay/PauseMenu/MainScreenButton
9
10
+const MESSAGE_DIED: = "You died"
11
+
12
var paused: = false setget set_paused
13
14
@@ -18,11 +20,11 @@ func _ready() -> void:
18
20
19
21
func _on_Player_died() -> void:
22
self.paused = true
- title_label.text = "You died"
23
+ title_label.text = MESSAGE_DIED
24
25
26
func _unhandled_input(event: InputEvent) -> void:
- if event.is_action_pressed("pause"):
27
+ if event.is_action_pressed("pause") and title_label.text != MESSAGE_DIED:
28
self.paused = not self.paused
29
30
0 commit comments