예제 #1
0
 public static SendDataController getInstance()
 {
     if (instance == null)
     {
         instance        = new SendDataController();
         instance.socket = ConnectSocket.getSocketInstance();
     }
     return(instance);
 }
예제 #2
0
 public void ButtonClick()
 {
     if (usernameInputField.text.Equals(""))
     {
         resultText.text = "请输入用户名";
     }
     else
     {
         PlayerPrefs.SetString("UserName", usernameInputField.text);
         resultText.text = "";
         SendDataController.getInstance().ConnectToServerRequest(usernameInputField.text);
     }
 }