|
@ -43,6 +43,7 @@ public class HomeScreenManager : MonoBehaviour { |
|
|
{ |
|
|
{ |
|
|
Server.SetActive(true); |
|
|
Server.SetActive(true); |
|
|
int intVal = 0; |
|
|
int intVal = 0; |
|
|
|
|
|
|
|
|
bool Succeeded = int.TryParse(Port.text, out intVal); |
|
|
bool Succeeded = int.TryParse(Port.text, out intVal); |
|
|
if (Succeeded) |
|
|
if (Succeeded) |
|
|
{ |
|
|
{ |
|
@ -52,8 +53,14 @@ public class HomeScreenManager : MonoBehaviour { |
|
|
{ |
|
|
{ |
|
|
Server.SetActive(false); |
|
|
Server.SetActive(false); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
IP.text = "127.0.0.1"; |
|
|
|
|
|
|
|
|
PlayerPrefs.SetString("PORT", Port.text); |
|
|
PlayerPrefs.SetString("PORT", Port.text); |
|
|
PlayerPrefs.SetString("NAME", Name.text); |
|
|
PlayerPrefs.SetString("NAME", Name.text); |
|
|
|
|
|
PlayerPrefs.SetString("IP", IP.text); |
|
|
|
|
|
|
|
|
|
|
|
Connect(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void ChangeName() |
|
|
public void ChangeName() |
|
|