summaryrefslogtreecommitdiff
path: root/Spatial.gd
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2026-11-18 02:12:48 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2026-11-18 02:12:48 +0100
commitb7617ff886730da3994d71c2ad940c1dc75bd681 (patch)
tree152711b3e62afdf58cd442bc6047cf863359dd50 /Spatial.gd
parent95f0826c2c168b34d41c8d1eed853ce4c9dc018c (diff)
downloadnj26-b7617ff886730da3994d71c2ad940c1dc75bd681.tar.gz
Introduce ui_escape key to exit game mode
Diffstat (limited to 'Spatial.gd')
-rw-r--r--Spatial.gd5
1 files changed, 5 insertions, 0 deletions
diff --git a/Spatial.gd b/Spatial.gd
index 9cec4af..e093df9 100644
--- a/Spatial.gd
+++ b/Spatial.gd
@@ -166,6 +166,9 @@ func _process(_delta):
text += ":%02d" % seconds
$CanvasLayer/cc/hb/time_left.text = text
+ if Input.is_action_just_released("ui_escape"):
+ go_back()
+
func _on_box_timeout():
var team
@@ -184,6 +187,8 @@ func start_game():
$game_time.start(120)
func go_back():
+ var mainmenu = load("res://mainmenu.tscn").instance()
+ get_tree().root.add_child(mainmenu)
get_tree().root.remove_child(self)
func set_players(players):