15 lines
305 B
GDScript
15 lines
305 B
GDScript
extends Node
|
|
|
|
func start_game():
|
|
print("Game starting")
|
|
$Menu.set_visible(false)
|
|
yield($Countdown.start(), "race_started")
|
|
Global.race_started = true
|
|
|
|
func pause_game():
|
|
$Menu.set_visible(true)
|
|
Global.race_started = false
|
|
|
|
func _input(event):
|
|
if event.is_action_pressed("ui_cancel"):
|
|
pause_game() |