adds basic menu functionnality
This commit is contained in:
23
Main.gd
23
Main.gd
@@ -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()
|
||||
Reference in New Issue
Block a user