|
@ -15,13 +15,13 @@ func _on_host_pressed(): |
|
|
var port = find_node("port").get_value() |
|
|
var port = find_node("port").get_value() |
|
|
var bots = find_node("bots").is_pressed() |
|
|
var bots = find_node("bots").is_pressed() |
|
|
var err = server.host_game(int(port), bots) |
|
|
var err = server.host_game(int(port), bots) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if err == OK: |
|
|
if err == OK: |
|
|
var lobby_menu = LobbyMenu.instance() |
|
|
var lobby_menu = LobbyMenu.instance() |
|
|
get_tree().get_root().add_child(lobby_menu) |
|
|
get_tree().get_root().add_child(lobby_menu) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gamestate.set_player(get_tree().get_network_unique_id()) |
|
|
gamestate.set_player(get_tree().get_network_unique_id()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
queue_free() |
|
|
queue_free() |
|
|
else: |
|
|
else: |
|
|
_on_back_pressed() |
|
|
_on_back_pressed() |
|
@ -30,4 +30,4 @@ func _on_host_pressed(): |
|
|
|
|
|
|
|
|
func _on_back_pressed(): |
|
|
func _on_back_pressed(): |
|
|
queue_free() |
|
|
queue_free() |
|
|
get_tree().get_root().get_node("multiplayer_menu").show() |
|
|
|
|
|
|
|
|
get_tree().get_root().get_node("multiplayer_menu").show() |