public void Awake() { instance = this; if (serverIp == null) { this.isServer = true; connection = new UdpConnectedClient(); } else { connection = new UdpConnectedClient(ip: serverIp); AddClient(new IPEndPoint(serverIp, Globals.port)); } }
public void Awake() { instance = this; username = MainSceneEventHandler.instance.usernameInput.text; if (serverIp == null) { this.isServer = true; connection = new UdpConnectedClient(); LobbyList.setPlayerName(username); LobbyList.setReadyStatement("N"); } else { connection = new UdpConnectedClient(ip: serverIp); AddClient(new IPEndPoint(serverIp, Globals.port)); } }