From ff8f8623d90a9be0e19f9874ca12121acfd44416 Mon Sep 17 00:00:00 2001 From: hevinci Date: Sat, 11 Mar 2023 00:14:26 +0800 Subject: [PATCH] update space shooter --- .../Runtime/PatchLogic/FsmNode/FsmClearCache.cs | 2 +- .../Runtime/PatchLogic/FsmNode/FsmCreateDownloader.cs | 2 +- .../Runtime/PatchLogic/FsmNode/FsmInitialize.cs | 8 ++++---- .../Runtime/PatchLogic/FsmNode/FsmUpdateManifest.cs | 2 +- .../Runtime/PatchLogic/FsmNode/FsmUpdateVersion.cs | 2 +- .../GameScript/Runtime/PatchLogic/PatchManager.cs | 2 +- .../GameScript/Runtime/UIWindow/UIHomeWindow.cs | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmClearCache.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmClearCache.cs index 3e0af38..efe8263 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmClearCache.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmClearCache.cs @@ -17,7 +17,7 @@ internal class FsmClearCache : IStateNode void IStateNode.OnEnter() { PatchEventDefine.PatchStatesChange.SendEventMessage("清理未使用的缓存文件!"); - var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage"); + var package = YooAsset.YooAssets.GetPackage("DefaultPackage"); var operation = package.ClearUnusedCacheFilesAsync(); operation.Completed += Operation_Completed; } diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmCreateDownloader.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmCreateDownloader.cs index e658890..c05ceaf 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmCreateDownloader.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmCreateDownloader.cs @@ -34,7 +34,7 @@ public class FsmCreateDownloader : IStateNode int downloadingMaxNum = 10; int failedTryAgain = 3; - var downloader = YooAssets.CreatePatchDownloader(downloadingMaxNum, failedTryAgain); + var downloader = YooAssets.CreateResourceDownloader(downloadingMaxNum, failedTryAgain); PatchManager.Instance.Downloader = downloader; if (downloader.TotalDownloadCount == 0) diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmInitialize.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmInitialize.cs index 719328c..1bf614d 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmInitialize.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmInitialize.cs @@ -38,11 +38,11 @@ internal class FsmInitialize : IStateNode // 创建默认的资源包 string packageName = "DefaultPackage"; - var package = YooAssets.TryGetAssetsPackage(packageName); + var package = YooAssets.TryGetPackage(packageName); if (package == null) { - package = YooAssets.CreateAssetsPackage(packageName); - YooAssets.SetDefaultAssetsPackage(package); + package = YooAssets.CreatePackage(packageName); + YooAssets.SetDefaultPackage(package); } // 编辑器下的模拟模式 @@ -50,7 +50,7 @@ internal class FsmInitialize : IStateNode if (playMode == EPlayMode.EditorSimulateMode) { var createParameters = new EditorSimulateModeParameters(); - createParameters.SimulatePatchManifestPath = EditorSimulateModeHelper.SimulateBuild(packageName); + createParameters.SimulateManifestFilePath = EditorSimulateModeHelper.SimulateBuild(packageName); initializationOperation = package.InitializeAsync(createParameters); } diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateManifest.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateManifest.cs index 420ba04..72841f0 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateManifest.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateManifest.cs @@ -32,7 +32,7 @@ public class FsmUpdateManifest : IStateNode { yield return new WaitForSecondsRealtime(0.5f); - var package = YooAssets.GetAssetsPackage("DefaultPackage"); + var package = YooAssets.GetPackage("DefaultPackage"); var operation = package.UpdatePackageManifestAsync(PatchManager.Instance.PackageVersion); yield return operation; diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateVersion.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateVersion.cs index 2275b4a..08e6eb9 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateVersion.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateVersion.cs @@ -32,7 +32,7 @@ internal class FsmUpdateVersion : IStateNode { yield return new WaitForSecondsRealtime(0.5f); - var package = YooAssets.GetAssetsPackage("DefaultPackage"); + var package = YooAssets.GetPackage("DefaultPackage"); var operation = package.UpdatePackageVersionAsync(); yield return operation; diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/PatchManager.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/PatchManager.cs index 33ccdd6..3197da7 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/PatchManager.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/PatchManager.cs @@ -22,7 +22,7 @@ public class PatchManager : ModuleSingleton, IModule /// /// 下载器 /// - public PatchDownloaderOperation Downloader { set; get; } + public ResourceDownloaderOperation Downloader { set; get; } private bool _isRun = false; diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs index 4867188..2490f89 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs @@ -24,7 +24,7 @@ public class UIHomeWindow : UIWindow } public override void OnRefresh() { - var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage"); + var package = YooAsset.YooAssets.GetPackage("DefaultPackage"); _version.text = "Ver : " + package.GetPackageVersion(); } public override void OnUpdate()