//Joins the gmae with the selected ip and name public void joinGameSelected() { //TODO: load lobby //Checks for valid string ip string ip = IpIn.text.Trim(); string name = Name_con.text.Trim(); if (string.IsNullOrEmpty(ip) || string.IsNullOrEmpty(name) || !(ushort.TryParse(Port_in.text, out port))) { //if bad move to error throwErrorScreen("You must enter an ip, name and port"); return; } playerName = name; connectedIP = ip; teleTransport.port = port; moveTo(4); isLeader = false; networkManager.networkAddress = ip; networkManager.StartClient(); connectedIP = ip + ":" + port; }
public void JoinLobby() { string ipAddress = ipAddressInputField.text; networkManager.networkAddress = ipAddress; networkManager.StartClient(); joinButton.interactable = false; }
private void JoinLobby() { string ipAddress = _ipAddressInput.text; _networkManager.networkAddress = ipAddress; _networkManager.StartClient(); _joinButton.interactable = false; }
public void JoinLobby() { //if(networkManager == null) networkManager = FindObjectOfType<NetworkManagerLobby>(); string ipAddress = ipAddressInputField.text; networkManager.networkAddress = ipAddress; networkManager.StartClient(); joinButton.interactable = false; }
public void JoinLobby() { SavePlayerName(); string ipAddress = ipAddressInputField.text; networkManager.networkAddress = ipAddress; networkManager.StartClient(); submitButton.interactable = false; }
public void JoinLobby() { //inputting ip address string ipAddress = ipAddressInputField.text; networkManager.networkAddress = ipAddress; networkManager.StartClient(); //Prevents player from spamming the join button joinButton.interactable = false; }
public void JoinLobby() { // sets the ip address to the input field string ipAddress = ipAddressInputField.text; //sets the network address tot eh ip address networkManager.networkAddress = ipAddress; networkManager.StartClient(); //Joins the lobby joinButton.interactable = false; //deactivates the join button }
public void JoinLobby() { string ipAddress = ipAddressInputField.text; if (string.IsNullOrWhiteSpace(ipAddress)) { ipAddress = "localhost"; } networkManager.networkAddress = ipAddress; networkManager.StartClient(); joinButton.interactable = false; }
public void JoinLobby() { string ipAdress = ipAdressInputField.text; if (string.IsNullOrEmpty(ipAdress)) { return; } networkManager.networkAddress = ipAdress; networkManager.StartClient(); joinButton.interactable = false; }
public void JoinLobby() { if (MainMenu.instance.playerName == "") { inputNamePanel.SetActive(true); return; } string ipAddress = ipAddressInputField.text; networkManager.networkAddress = ipAddress; networkManager.StartClient(); joinButton.interactable = false; }
public void JoinLobby() { string ipAddress = ipAddressInputField.text; if (ipAddress == "localhost") { networkManager.networkAddress = "localhost"; } else if (ipAddress == "hostIP") { networkManager.networkAddress = "216.232.168.16"; } networkManager.StartClient(); joinButton.interactable = false; }
public void JoinGame() { if (!(CheckForErrors(pseudo) || CheckForErrors(portJoin) || CheckForErrors(addressJoin))) { PlayerPrefs.SetString("Pseudo", pseudo.text); networkManager.networkAddress = addressJoin.text; networkManager.GetComponent <kcp2k.KcpTransport>().Port = Convert.ToUInt16(portJoin.text); networkManager.StartClient(); joinButton.SetActive(false); } else { CheckForErrorsColor(pseudo); CheckForErrorsColor(addressJoin); CheckForErrorsColor(portJoin); } }
// Updated by Kyle | May 25, 2021 public void joinGame() { string[] segments = ipInput.text.Trim().Split(':'); //validate ip if (!(isValidIpv4(segments[0]) || isValidIpv6(segments[0]) || segments[0].Equals("localhost"))) { Debug.LogError("Invalid IP " + segments[0]); return; } //validate port if (!ushort.TryParse(segments[1], out port)) { Debug.LogError("Invalid Port " + segments[1]); return; } networkManager.networkAddress = segments[0]; networkManager.Tele.port = port; networkManager.StartClient(); setMenu(3); }