void FileUpdateing(ByteFileInfoList pInfo, UpdateComplete onComplete, bool autoRetry)
        {
            curInfo       = pInfo;
            curOnComplete = onComplete;
            curAutoRetry  = autoRetry;
            ReleaseGroupLoader();
            downLoadGroup = new DownLoadGroup("updateGroup");
            foreach (var item in pInfo.fileInfoList)
            {
                string turl    = GetServerUrl(item.resName);
                var    tloader = downLoadGroup.AddByUrl(turl, GameCore.PersistentResDataPath, item.resName, item.fileMD5, item.fileSize, false);
                tloader.priority    = item.priority;
                tloader.OnComplete += (a) =>
                {
                    if (a.IsCompleteDownLoad)
                    {
                        OnUpdateOneComplete(pInfo[a.FileName]);
                    }
                };
            }
            downLoadGroup.StartAsync();
            UpdateProcess();

            StartCoroutine(WaitUpdateDone());
        }
        ByteFileInfoList GetErroListInfo(DownLoadGroup pGroup, ByteFileInfoList pInfo)
        {
            var tlist = pGroup.GetNotCompletFileNameTable();

            pInfo.RemoveRangeWithOutList(tlist);
            return(pInfo);
        }
 void ReleaseGroupLoader()
 {
     if (downLoadGroup == null)
     {
         return;
     }
     downLoadGroup.Dispose();
     downLoadGroup = null;
 }
Example #4
0
 void DownloadProcessG(DownLoadGroup pSender)
 {
     Debug.Log(pSender.Progress);
 }
Example #5
0
 void DownloadCompleteG(DownLoadGroup pSender)
 {
     Debug.Log("DownloadComplete-" + pSender.Key + " - error:" + pSender.Error);
 }