同步
This commit is contained in:
22
Assets/Scripts/Game/Base/Interfaces/IScheduledElement.cs
Normal file
22
Assets/Scripts/Game/Base/Interfaces/IScheduledElement.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
/// <summary>
|
||||
/// 所有参与集中更新调度的元素需实现的接口。
|
||||
/// 同一元素可注册到多个 <see cref="UpdatePhase"/>,
|
||||
/// 通过 <paramref name="phase"/> 参数区分当前所处阶段并执行对应逻辑。
|
||||
/// </summary>
|
||||
public interface IScheduledElement
|
||||
{
|
||||
/// <summary>
|
||||
/// 由 <see cref="ElementUpdateScheduler"/> 在对应阶段调用。
|
||||
/// </summary>
|
||||
/// <param name="phase">当前执行的更新阶段</param>
|
||||
/// <param name="songTime">当前音频播放时间(秒)</param>
|
||||
void ScheduledUpdate(UpdatePhase phase, float songTime);
|
||||
|
||||
/// <summary>
|
||||
/// 元素是否处于活跃状态。调度器跳过非活跃元素以节省开销。
|
||||
/// </summary>
|
||||
bool IsScheduledActive { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user