Exemplo n.º 1
0
        IEnumerator CheckingUpdate(CheckComplete onComplete, bool useCache, bool needRetry)
        {
            ReleaseCheckLoader();

            string tuf        = GetServerUrl(LoaderManager.byteFileInfoFileName + BaseBundle.sSuffixName);
            string tcheckfile = GetCheckFileName();
            string tfilePath  = GameCore.CombinePath(GameCore.PersistentResDataPath, tcheckfile);

            if (!useCache || !File.Exists(tfilePath))
            {
                checkLoader = DownLoadManager.DownLoadFileAsync(tuf, GameCore.PersistentResDataPath, tcheckfile, null, 0, null);
                while (!checkLoader.IsDone)
                {
                    yield return(null);
                }
                DownLoadCheckFileEnd(checkLoader, onComplete, useCache, needRetry);
            }
            else
            {
                DownLoadCheckFileFinished(onComplete);
            }
        }
Exemplo n.º 2
0
        IEnumerator CheckingUpdate(CheckComplete onComplete, bool useCache, bool needRetry)
        {
            ReleaseCheckLoader();

            string tdicpath   = string.Format("{0}/{1}/", updateData.server, updateData.version);
            string tuf        = GetServerUrl(LoadManager.byteFileInfoFileName + LoadManager.sSuffixName);
            string tcheckfile = GetCheckFileName();
            string tfilePath  = CombinePath(LoadManager.sidePath, tcheckfile);

            if (!useCache || !File.Exists(tfilePath))
            {
                checkLoader = DownLoadManager.DownLoadFileAsync(tuf, LoadManager.sidePath, tcheckfile, null, 0, null);
                while (!checkLoader.IsDone)
                {
                    yield return(null);
                }
                DownLoadCheckFileEnd(checkLoader, onComplete, useCache, needRetry);
            }
            else
            {
                DownLoadCheckFileFinished(onComplete);
            }
        }