Ejemplo n.º 1
0
        public PatchDownloader CreateDLCDownloader(string[] dlcLabels, int maxNumberOnLoad)
        {
            if (_isRun == false)
            {
                throw new Exception($"The patch system is not start. Call PatchManager.Instance.Download()");
            }
            if (IsFinish() == false)
            {
                throw new Exception($"The patch system is not over.");
            }

            var             downloadList = _patcher.GetPatchDownloadList(dlcLabels);
            PatchDownloader downlader    = new PatchDownloader(_patcher, downloadList, maxNumberOnLoad);

            return(downlader);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 创建补丁下载器
        /// </summary>
        /// <param name="dlcTags">DLC标记列表</param>
        /// <param name="maxNumberOnLoad">同时下载的最大文件数</param>
        /// <param name="failedTryAgain">下载失败的重试次数</param>
        public PatchDownloader CreateDLCDownloader(string[] dlcTags, int maxNumberOnLoad, int failedTryAgain)
        {
            if (dlcTags == null || dlcTags.Length == 0)
            {
                throw new Exception("DLC tags is null or empty.");
            }
            if (_isRun == false)
            {
                throw new Exception($"The patch pipeline is not start. Call PatchManager.Instance.Download()");
            }
            if (IsFinish() == false)
            {
                throw new Exception($"The patch pipeline is not done.");
            }

            var             downloadList = _patcher.GetPatchDownloadList(dlcTags);
            PatchDownloader downlader    = new PatchDownloader(_patcher, downloadList, maxNumberOnLoad, failedTryAgain);

            return(downlader);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 创建内置的加载器
 /// </summary>
 public void CreateInternalDownloader(List <PatchElement> downloadList)
 {
     MotionLog.Log("Create internal patch downloader.");
     InternalDownloader = new PatchDownloader(this, downloadList, _maxNumberOnLoad);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 创建内置的加载器
 /// </summary>
 public void CreateInternalDownloader(List <PatchBundle> downloadList)
 {
     MotionLog.Log("Create internal patch downloader.");
     InternalDownloader = new PatchDownloader(this, downloadList, _maxNumberOnLoad, _failedTryAgain);
 }