public void OnServerAnswer(NetworkMessage netmsg) { Message.Registration reg = netmsg.ReadMessage <Message.Registration> (); bool regResult = reg.Registr; if (!regResult) { serverAnswer.text = reg.Answer; } else { myClient.myClient = client; Networking_client.isConnection = true; myClient.RegisterHandler(); serverAnswer.text = reg.Answer; } }
// Update is called once per frame void Update() { if (client.isConnected) { if (!registerSend) { Message.Registration regist = new Message.Registration(); regist.Login = login.text; regist.Password = password.text; regist.Mail = mail.text; client.Send(Networking_msgType.Registration, regist); registerSend = true; } } else { isConnect = false; } }