mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
TE6 打飞机Demo
TE6 打飞机Demo
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using Launcher;
|
||||
using TEngine;
|
||||
using ProcedureOwner = TEngine.IFsm<TEngine.IProcedureModule>;
|
||||
|
||||
namespace Procedure
|
||||
{
|
||||
/// <summary>
|
||||
/// 流程 => 清理缓存。
|
||||
/// </summary>
|
||||
public class ProcedureClearCache : ProcedureBase
|
||||
{
|
||||
public override bool UseNativeDialog { get; }
|
||||
|
||||
private ProcedureOwner _procedureOwner;
|
||||
|
||||
protected override void OnEnter(ProcedureOwner procedureOwner)
|
||||
{
|
||||
_procedureOwner = procedureOwner;
|
||||
Log.Info("清理未使用的缓存文件!");
|
||||
|
||||
LauncherMgr.Show(UIDefine.UILoadUpdate, $"清理未使用的缓存文件...");
|
||||
|
||||
var operation = _resourceModule.ClearCacheFilesAsync();
|
||||
operation.Completed += Operation_Completed;
|
||||
}
|
||||
|
||||
|
||||
private void Operation_Completed(YooAsset.AsyncOperationBase obj)
|
||||
{
|
||||
LauncherMgr.Show(UIDefine.UILoadUpdate, $"清理完成 即将进入游戏...");
|
||||
|
||||
ChangeState<ProcedurePreload>(_procedureOwner);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user