17 lines
411 B
GDScript
17 lines
411 B
GDScript
extends Control
|
|
|
|
|
|
func _on_create_server_pressed():
|
|
get_tree().change_scene_to_file("res://server/server.tscn")
|
|
|
|
|
|
func _on_connect_to_server_pressed():
|
|
var address: String = %ConnectIP.text
|
|
var port := int(%ConnectPort.text)
|
|
var parent := get_parent()
|
|
queue_free()
|
|
var scene := preload("res://server/client_lobbies.tscn").instantiate()
|
|
scene.address = address
|
|
scene.port = port
|
|
parent.add_child(scene)
|