update space shooter

pull/82/head
hevinci 2023-03-11 00:14:26 +08:00
parent 1ce1a6f0ff
commit ff8f8623d9
7 changed files with 10 additions and 10 deletions

View File

@ -17,7 +17,7 @@ internal class FsmClearCache : IStateNode
void IStateNode.OnEnter() void IStateNode.OnEnter()
{ {
PatchEventDefine.PatchStatesChange.SendEventMessage("清理未使用的缓存文件!"); PatchEventDefine.PatchStatesChange.SendEventMessage("清理未使用的缓存文件!");
var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage"); var package = YooAsset.YooAssets.GetPackage("DefaultPackage");
var operation = package.ClearUnusedCacheFilesAsync(); var operation = package.ClearUnusedCacheFilesAsync();
operation.Completed += Operation_Completed; operation.Completed += Operation_Completed;
} }

View File

@ -34,7 +34,7 @@ public class FsmCreateDownloader : IStateNode
int downloadingMaxNum = 10; int downloadingMaxNum = 10;
int failedTryAgain = 3; int failedTryAgain = 3;
var downloader = YooAssets.CreatePatchDownloader(downloadingMaxNum, failedTryAgain); var downloader = YooAssets.CreateResourceDownloader(downloadingMaxNum, failedTryAgain);
PatchManager.Instance.Downloader = downloader; PatchManager.Instance.Downloader = downloader;
if (downloader.TotalDownloadCount == 0) if (downloader.TotalDownloadCount == 0)

View File

@ -38,11 +38,11 @@ internal class FsmInitialize : IStateNode
// 创建默认的资源包 // 创建默认的资源包
string packageName = "DefaultPackage"; string packageName = "DefaultPackage";
var package = YooAssets.TryGetAssetsPackage(packageName); var package = YooAssets.TryGetPackage(packageName);
if (package == null) if (package == null)
{ {
package = YooAssets.CreateAssetsPackage(packageName); package = YooAssets.CreatePackage(packageName);
YooAssets.SetDefaultAssetsPackage(package); YooAssets.SetDefaultPackage(package);
} }
// 编辑器下的模拟模式 // 编辑器下的模拟模式
@ -50,7 +50,7 @@ internal class FsmInitialize : IStateNode
if (playMode == EPlayMode.EditorSimulateMode) if (playMode == EPlayMode.EditorSimulateMode)
{ {
var createParameters = new EditorSimulateModeParameters(); var createParameters = new EditorSimulateModeParameters();
createParameters.SimulatePatchManifestPath = EditorSimulateModeHelper.SimulateBuild(packageName); createParameters.SimulateManifestFilePath = EditorSimulateModeHelper.SimulateBuild(packageName);
initializationOperation = package.InitializeAsync(createParameters); initializationOperation = package.InitializeAsync(createParameters);
} }

View File

@ -32,7 +32,7 @@ public class FsmUpdateManifest : IStateNode
{ {
yield return new WaitForSecondsRealtime(0.5f); yield return new WaitForSecondsRealtime(0.5f);
var package = YooAssets.GetAssetsPackage("DefaultPackage"); var package = YooAssets.GetPackage("DefaultPackage");
var operation = package.UpdatePackageManifestAsync(PatchManager.Instance.PackageVersion); var operation = package.UpdatePackageManifestAsync(PatchManager.Instance.PackageVersion);
yield return operation; yield return operation;

View File

@ -32,7 +32,7 @@ internal class FsmUpdateVersion : IStateNode
{ {
yield return new WaitForSecondsRealtime(0.5f); yield return new WaitForSecondsRealtime(0.5f);
var package = YooAssets.GetAssetsPackage("DefaultPackage"); var package = YooAssets.GetPackage("DefaultPackage");
var operation = package.UpdatePackageVersionAsync(); var operation = package.UpdatePackageVersionAsync();
yield return operation; yield return operation;

View File

@ -22,7 +22,7 @@ public class PatchManager : ModuleSingleton<PatchManager>, IModule
/// <summary> /// <summary>
/// 下载器 /// 下载器
/// </summary> /// </summary>
public PatchDownloaderOperation Downloader { set; get; } public ResourceDownloaderOperation Downloader { set; get; }
private bool _isRun = false; private bool _isRun = false;

View File

@ -24,7 +24,7 @@ public class UIHomeWindow : UIWindow
} }
public override void OnRefresh() public override void OnRefresh()
{ {
var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage"); var package = YooAsset.YooAssets.GetPackage("DefaultPackage");
_version.text = "Ver : " + package.GetPackageVersion(); _version.text = "Ver : " + package.GetPackageVersion();
} }
public override void OnUpdate() public override void OnUpdate()