24 lines
444 B
GDScript
24 lines
444 B
GDScript
extends Node
|
|
|
|
const MultiplayerClient = preload("multiplayer_client.gd")
|
|
|
|
onready var client = MultiplayerClient.new()
|
|
|
|
func _ready():
|
|
add_child(client)
|
|
|
|
func goto_scene(scene_resource_name):
|
|
var _result = get_tree().change_scene("res://%s.tscn" % scene_resource_name)
|
|
|
|
func main_menu():
|
|
goto_scene("main")
|
|
|
|
func start_singleplayer_game():
|
|
goto_scene("game")
|
|
|
|
func multiplayer():
|
|
goto_scene("multiplayer")
|
|
|
|
func quit():
|
|
get_tree().quit()
|