void Message_Login_Result(TcpResponseLogin _mes) { if (_mes.result) { NetGlobal.Instance().userUid = _mes.uid; NetGlobal.Instance().udpSendPort = _mes.udpPort; Debug.Log("登录成功~~~" + NetGlobal.Instance().userUid); ClearSceneData.LoadScene(GameConfig.mainScene); } else { Debug.Log("登录失败~~~"); waitTip.SetActive(false); } }
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); } } }
void Message_Enter_Battle(PBBattle.TcpEnterBattle _mes) { BattleData.Instance.UpdateBattleInfo(_mes.randSeed, _mes.battleUserInfo); ClearSceneData.LoadScene(GameConfig.battleScene); }
public void OnClickExit() { ClearSceneData.LoadScene(GameConfig.mainScene); }