adds basic menu functionnality

This commit is contained in:
2020-11-03 23:04:17 +01:00
parent 4f2a4768c8
commit 3e10a98beb
13 changed files with 175 additions and 95 deletions

23
Main.gd
View File

@@ -1,18 +1,15 @@
extends Node
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass
func start_game():
pass
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 change_track():
""" Change the race track """
pass
func _input(event):
if event.is_action_pressed("ui_cancel"):
pause_game()