private void LoginCon_On_TCP_Message(MessageBuffer msg) { if (ServerToClientID.TcpResponseLogin == (ServerToClientID)msg.Id()) { TcpResponseLogin _mes = ProtoTransfer.DeserializeProtoBuf3 <TcpResponseLogin>(msg); if (_mes.Result) { Debug.Log("登录成功~~~" + _mes.Uid); ClientService.GetSingleton().token = _mes.Token; //场景 ClearSceneData.LoadScene(GameConfig.mainScene); } else { text.text = _mes.Reason; waitTip.SetActive(false); } } }
private void LoginCon_On_TCP_Message(MessageBuffer msg) { if (ServerToClientID.TcpResponseRegister == (ServerToClientID)msg.Id()) { TcpResponseRegister _mes = ProtoTransfer.DeserializeProtoBuf3 <TcpResponseRegister>(msg); if (_mes.Result) { Debug.Log("注册成功~~~"); ClientService.GetSingleton().token = _mes.Token; this.gameObject.SetActive(false); panel_Login.SetActive(true); waitTip.SetActive(false); } else { text.text = "注册失败"; waitTip.SetActive(false); } } }