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); }
/// <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); }