Files
Convention-Unity-Demo/Assets/Scripts/Framework/UpdateScheduler/IUpdateable.cs

48 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using UnityEngine;
namespace Demo.Game
{
/// <summary>
/// 统一Update接口用于扁平化调度
/// </summary>
public interface IUpdateable
{
/// <summary>
/// 扁平化优化Update调用直接更新对象自身无递归遍历子对象
/// </summary>
void FlatOptimizationUpdate(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
}
}