17 lines
411 B
GDScript3
17 lines
411 B
GDScript3
|
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)
|