Skip to content

Commit

Permalink
[修改]1. 修改接口变化
Browse files Browse the repository at this point in the history
  • Loading branch information
AlianBlank committed Aug 15, 2024
1 parent fe889c2 commit 161dc4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ protected override void OnEnter(IFsm<IProcedureManager> procedureOwner)
void CreateDownloader(IFsm<IProcedureManager> procedureOwner)
{
// Debug.Log("创建补丁下载器.");
int downloadingMaxNum = 10;
int failedTryAgain = 3;
ResourceDownloaderOperation downloader = YooAssets.CreateResourceDownloader(downloadingMaxNum, failedTryAgain);
int downloadingMaxNum = 10;
int failedTryAgain = 3;
ResourceDownloaderOperation downloader = YooAssets.CreateResourceDownloader(downloadingMaxNum, failedTryAgain);
var downloaderVarObject = new VarObject();
downloaderVarObject.SetValue(downloader);
procedureOwner.SetData<VarObject>("Downloader", downloaderVarObject);
Expand All @@ -37,9 +37,9 @@ void CreateDownloader(IFsm<IProcedureManager> procedureOwner)
Debug.Log($"一共发现了{downloader.TotalDownloadCount}个资源需要更新下载。");

// 发现新更新文件后,挂起流程系统
int totalDownloadCount = downloader.TotalDownloadCount;
int totalDownloadCount = downloader.TotalDownloadCount;
long totalDownloadBytes = downloader.TotalDownloadBytes;
GameApp.Event.Fire(this, AssetFoundUpdateFilesEventArgs.Create(downloader.PackageName, totalDownloadCount, totalDownloadBytes));
GameApp.Event.Fire(this, AssetFoundUpdateFilesEventArgs.Create(downloader.GetPackageName(), totalDownloadCount, totalDownloadBytes));
ChangeState<ProcedureDownloadWebFiles>(procedureOwner);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private IEnumerator GetStaticVersion(IFsm<IProcedureManager> procedureOwner)
yield return new WaitForSecondsRealtime(0.1f);

var buildInResourcePackage = YooAssets.GetPackage(AssetComponent.BuildInPackageName);
var buildInOperation = buildInResourcePackage.UpdatePackageVersionAsync();
var buildInOperation = buildInResourcePackage.RequestPackageVersionAsync();
yield return buildInOperation;

if (buildInOperation.Status == EOperationStatus.Succeed)
Expand Down

0 comments on commit 161dc4e

Please sign in to comment.