Skip to content

Commit 161dc4e

Browse files
committed
[修改]1. 修改接口变化
1 parent fe889c2 commit 161dc4e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Assets/Scripts/Framework/Procedure/PatchUpdater/ProcedureCreateDownloader.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ protected override void OnEnter(IFsm<IProcedureManager> procedureOwner)
2121
void CreateDownloader(IFsm<IProcedureManager> procedureOwner)
2222
{
2323
// Debug.Log("创建补丁下载器.");
24-
int downloadingMaxNum = 10;
25-
int failedTryAgain = 3;
26-
ResourceDownloaderOperation downloader = YooAssets.CreateResourceDownloader(downloadingMaxNum, failedTryAgain);
24+
int downloadingMaxNum = 10;
25+
int failedTryAgain = 3;
26+
ResourceDownloaderOperation downloader = YooAssets.CreateResourceDownloader(downloadingMaxNum, failedTryAgain);
2727
var downloaderVarObject = new VarObject();
2828
downloaderVarObject.SetValue(downloader);
2929
procedureOwner.SetData<VarObject>("Downloader", downloaderVarObject);
@@ -37,9 +37,9 @@ void CreateDownloader(IFsm<IProcedureManager> procedureOwner)
3737
Debug.Log($"一共发现了{downloader.TotalDownloadCount}个资源需要更新下载。");
3838

3939
// 发现新更新文件后,挂起流程系统
40-
int totalDownloadCount = downloader.TotalDownloadCount;
40+
int totalDownloadCount = downloader.TotalDownloadCount;
4141
long totalDownloadBytes = downloader.TotalDownloadBytes;
42-
GameApp.Event.Fire(this, AssetFoundUpdateFilesEventArgs.Create(downloader.PackageName, totalDownloadCount, totalDownloadBytes));
42+
GameApp.Event.Fire(this, AssetFoundUpdateFilesEventArgs.Create(downloader.GetPackageName(), totalDownloadCount, totalDownloadBytes));
4343
ChangeState<ProcedureDownloadWebFiles>(procedureOwner);
4444
}
4545
}

Assets/Scripts/Framework/Procedure/PatchUpdater/ProcedureUpdateStaticVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private IEnumerator GetStaticVersion(IFsm<IProcedureManager> procedureOwner)
2323
yield return new WaitForSecondsRealtime(0.1f);
2424

2525
var buildInResourcePackage = YooAssets.GetPackage(AssetComponent.BuildInPackageName);
26-
var buildInOperation = buildInResourcePackage.UpdatePackageVersionAsync();
26+
var buildInOperation = buildInResourcePackage.RequestPackageVersionAsync();
2727
yield return buildInOperation;
2828

2929
if (buildInOperation.Status == EOperationStatus.Succeed)

0 commit comments

Comments
 (0)