update space shooter
parent
1ce1a6f0ff
commit
ff8f8623d9
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public class PatchManager : ModuleSingleton<PatchManager>, IModule
|
|||
/// <summary>
|
||||
/// 下载器
|
||||
/// </summary>
|
||||
public PatchDownloaderOperation Downloader { set; get; }
|
||||
public ResourceDownloaderOperation Downloader { set; get; }
|
||||
|
||||
|
||||
private bool _isRun = false;
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue