Пример #1
0
        //string mResPath = "";

        public void Initialize(Action initOK, string manifestName = GameConfig.STR_ASB_MANIFIST)
        {
            //mResPath = Tools.GetResPath();
            if (GameConfig.UseAsb)
            {
                ResVersion = GameConfig.GetInt(GameDefine.STR_CONF_KEY_RES_VER_I, 0);
                LoadAsset <AssetBundleManifest>(manifestName, new string[] { "AssetBundleManifest" }, delegate(UObj[] objs)
                {
                    if (objs.Length > 0)
                    {
                        m_AssetBundleManifest = objs[0] as AssetBundleManifest;
                        mAllBundles           = new List <string>(m_AssetBundleManifest.GetAllAssetBundles());
                    }
                    if (initOK != null)
                    {
                        initOK();
                    }
                });
            }
            else
            {
                if (initOK != null)
                {
                    initOK();
                }
            }
        }
Пример #2
0
        void saveVersionCode()
        {
            int    code    = mCurConf.VersionCode;
            string key     = GameDefine.STR_CONF_KEY_RES_VER_I;
            int    curCode = GameConfig.GetInt(key);

            if (curCode < code)
            {
                GameConfig.SetInt(key, code);
                EventManager.NotifyMain(STR_EVENT_PKG_VERSION, mCurConf.version);
            }
            else
            {
                LogFile.Warn("保存 VersionCode 失败,当前包名:" + mPkgName + "; 新code:" + code + "; 当前 code:" + curCode);
            }
        }