extends Control

var player

func _ready():
	print($/root/main/world/menuPlayer)
	player = $/root/main/world/menuPlayer

func _on_button_pressed() -> void:
	NetworkHandler.startServer()
	player.queue_free()


func _on_button_2_pressed() -> void:
	var IPAdress = "localhost"
	if $VBoxContainer/LineEdit.text != "":
		IPAdress = $VBoxContainer/LineEdit.text
	player.queue_free()
	NetworkHandler.startClient(IPAdress)
