阶段1/UpdateScheduler调度器优化, 未嵌入
This commit is contained in:
47
Assets/Scripts/Framework/UpdateScheduler/IUpdateable.cs
Normal file
47
Assets/Scripts/Framework/UpdateScheduler/IUpdateable.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
/// <summary>
|
||||
/// 统一Update接口,用于扁平化调度
|
||||
/// </summary>
|
||||
public interface IUpdateable
|
||||
{
|
||||
/// <summary>
|
||||
/// 直接Update调用,无递归
|
||||
/// </summary>
|
||||
void DoUpdate(float currentTime, float deltaTime, ScriptableObject.TickType tickType);
|
||||
|
||||
/// <summary>
|
||||
/// 对象名称,用于调试
|
||||
/// </summary>
|
||||
string GetUpdateName();
|
||||
|
||||
/// <summary>
|
||||
/// 是否已应用脚本
|
||||
/// </summary>
|
||||
bool IsUpdateReady { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update模式
|
||||
/// </summary>
|
||||
public enum UpdateMode
|
||||
{
|
||||
/// <summary>
|
||||
/// 永久活跃(整个关卡周期)
|
||||
/// </summary>
|
||||
Permanent,
|
||||
|
||||
/// <summary>
|
||||
/// 有时间范围限制
|
||||
/// </summary>
|
||||
TimeBound,
|
||||
|
||||
/// <summary>
|
||||
/// 手动控制激活/停用
|
||||
/// </summary>
|
||||
Manual
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user