This commit is contained in:
2020-11-04 22:34:00 +01:00
parent 056e346a96
commit b64430e10b
14 changed files with 326 additions and 131 deletions

14
Main.gd
View File

@@ -1,14 +1,20 @@
extends Node
func _ready():
get_tree().paused = true
func start_game():
print("Game starting")
$Menu.set_visible(false)
yield($Countdown.start(), "race_started")
Global.race_started = true
if not Global.race_started:
print("Game starting")
Global.race_started = true
$GUI.set_visible(true)
yield($Countdown.start(), "completed")
get_tree().paused = false
func pause_game():
$Menu.set_visible(true)
Global.race_started = false
get_tree().paused = true
func _input(event):
if event.is_action_pressed("ui_cancel"):