IEnumerator Initialize()
        {
            Game.assetManager = gameObject.AddComponent <AssetManager>();

            VersionManager versionManager = gameObject.AddComponent <VersionManager>();

            launchPanel.Show(versionManager);
            yield return(versionManager.CheckVersion());

            if (versionManager.yieldbreak)
            {
                yield break;
            }

            yield return(Game.assetManager.Initialize());

            #if UNITY_EDITOR
            if (!GameConst.DevelopMode)
            #endif
            {
                yield return(InitConfig());
            }

            GameObject.Destroy(launchPanel.gameObject);
            launchPanel = null;
            TestModeule();
        }
        public void RequestLogin(REQ_Login loginInfo)
        {
            _currentUserID = loginInfo.UserID;

            Log.Info("客户请求登录,来自IP:{0},用户ID:{1}", tcpSession.RemoteIPEndPoint, _currentUserID);

            UpdateLevel updateLevel = VersionManager.CheckVersion(loginInfo.ClientVersion);

            if (updateLevel == UpdateLevel.Necessary)
            {
                SendAutoUpdaterConfig(SocketConfig.UpdateXmlUrl_complete);
                return;
            }
            else if (updateLevel == UpdateLevel.Optional)
            {
                SendAutoUpdaterConfig(SocketConfig.UpdateXmlUrl_patch);
                return;// 临时的
            }

            if (loginInfo.LoginType == LoginType.First)
            {
                FirstLogin(loginInfo);
            }
            else if (loginInfo.LoginType == LoginType.Reconnect)
            {
                Reconnect(loginInfo);
            }
        }
Esempio n. 3
0
        public JsonResult CheckVersionUpdate(string versionCode)
        {
            var data = new AjaxResult()
            {
                Code    = 0,
                Data    = VersionManager.CheckVersion(versionCode),
                Success = true
            };

            JsonResult result = new JsonResult();

            result.Data = data;
            return(result);
        }
Esempio n. 4
0
        static void OnLoadingComplete(EventArgs args)
        {
            VersionManager.CheckVersion();

            try
            {
                Activator.CreateInstance(null, "WuAIO." + Player.Instance.ChampionName);
                Chat.Print("Wu{0} Loaded, [By WujuSan], Version: {1}", Player.Instance.ChampionName == "MasterYi" ? "Yi" : Player.Instance.ChampionName, VersionManager.AssVersion);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }