/// <summary> /// 客户端请求用户登陆 /// </summary> private void ClientLoginRequest(string rConnectorURL, int rConnectorPort) { NetworkClient.Instance.Connect(rConnectorURL, rConnectorPort, () => { string rMsg = mAccountName + "|" + mPassword + "|" + DateTime.Now.Ticks; string rToken = CryptoUtility.Encrypt(rMsg, UtilTool.SessionSecrect); GamePlayProtocol.DoClientLoginRequest(rToken); }); }
/// <summary> /// 请求连接服务器 /// </summary> public void LoginGateServer(string rGateHost, int nGatePort, int nServerID, string rAccountName, string rAccountPassword) { mAccountName = rAccountName; mPassword = rAccountPassword; mGateHost = rGateHost; mGatePort = nGatePort; mServerID = nServerID; Debug.Log("LoginGateServer"); NetworkClient.Instance.Connect(this.mGateHost, this.mGatePort, () => { GamePlayProtocol.DoClientQueryGateEntryRequest(mAccountName); }); }