using GFramework.Core.Abstractions.coroutine; using GFramework.Core.coroutine; using GFramework.Core.system; namespace GFramework.Game.coroutine; /// /// 协程系统类,负责管理和更新协程调度器 /// /// 协程调度器实例 public class CoroutineSystem(CoroutineScheduler scheduler) : AbstractSystem, ICoroutineSystem { /// /// 更新协程系统,驱动协程调度器执行协程逻辑 /// /// 时间间隔,表示自上一帧以来经过的时间(秒) public void OnUpdate(float deltaTime) { // 更新协程调度器,处理等待中的协程 scheduler.Update(deltaTime); } /// /// 初始化协程系统 /// protected override void OnInit() { } }