Added main menu
This commit is contained in:
parent
ae936275b7
commit
18b2a3491c
7 changed files with 89 additions and 30 deletions
|
@ -4,12 +4,10 @@ extends Node2D
|
|||
func _ready():
|
||||
process_mode = Node.PROCESS_MODE_ALWAYS
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("restart"):
|
||||
if event.is_action_pressed("restart") and $Clock/Label/HTTPRequest.get_http_client_status() == HTTPClient.STATUS_DISCONNECTED:
|
||||
get_tree().paused = false
|
||||
get_tree().reload_current_scene()
|
||||
if event.is_action_pressed("quit") and $Clock/Label/HTTPRequest.get_http_client_status() == HTTPClient.STATUS_DISCONNECTED:
|
||||
get_tree().paused = false
|
||||
get_tree().change_scene_to_file("res://main_menu.tscn")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue