private void AutoLogin() { //1、初始化登陆界面信息 Login_Gate.OpenLoginInit(); //2、检查是否遵守协议信息 if (!Login_Protocol.GetProtocolIsAbide()) { //如果未遵守协议, 登录界面加载完毕即可,等待用户点击操作判断 return; } //3、检查网络 if (!Login_Connect.CheckNetworkReachability()) { //网络连接异常 则返回 return; } //4、判断是否存在上一次登录成功的信息 if (!PlayerComponent.This.CheckLocalAccount()) { //如果不存在, 登录界面加载完毕即可,等待用户点击操作判断 return; } //5、如果存在,且上一次用户最后状态为已登录继续往下 自动登陆 Login_Gate.AutoLoginAndWait(); }
public bool CheckNetworkReachability() { //当网络不可用时 if (Application.internetReachability == NetworkReachability.NotReachable) { //网络连接异常 Login_Connect.PageToConnectError(); return(false); } return(true); }
private void ConfirmLoginToGate() { //1、判断是否遵守游戏协议 if (!PlayerComponent.This.GetProtocolStats()) { //提示勾选协议框 Login_Protocol.PageToProtocolInit(); return; } //2、检查网络连接是否异常 if (Application.internetReachability == NetworkReachability.NotReachable) { //网络连接异常 Login_Connect.PageToConnectError(); return; } //3、需要判断当前账户是否已经登录 //if (SessionComponent.Instance.Session == null) //{ // //TODO // return; //} //if (SessionComponent.Instance.Session.IsDisposed) //{ // //TUDO 需要调整成,变灰暗 // Log.Warning("网络连接异常,请重新再试"); // return; //} //4、设置流程参数 //procedureOwner.SetData<VarInt>("UpdateResourceCount", m_UpdateResourceCount); //RunCore.ProcedureOnly.GetProcedureFsm().SetData<Type>("ProcedureType", typeof()); //5、加载进度条(调用热更新部分的 进度条加载) EventComponent.This.Run(Login_Event.E_Loading_R2H); //下面功能全部转Hotfix //1、开始加载进度条 loading界面打开 //2、loading界面事件初始化 //3、流程跳转,切换到 游戏登录流程 //4、获取用户角色信息(同时) //5、加载地图模型(同时) //6、加载技能信息(同时) //7、加载周边信息(同时) //8、场景渲染(同时) //9、ping延时 //10、聊天服连接(同时) //11、加载当前登录地区 地图时时信息(同时) }