mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-23 19:24:29 +08:00
- 添加协程上下文、句柄、调度器和作用域管理类 - 实现协程等待指令包括 WaitForSeconds、WaitUntil 和 WaitWhile - 创建协程系统和全局协程作用域管理器 - 定义协程相关抽象接口 ICoroutineScheduler、ICoroutineScope 等 - 升级 Meziantou.Analyzer 依赖版本至 2.0.283 - 升级 Meziantou.Polyfill 依赖版本至 1.0.100
18 lines
511 B
C#
18 lines
511 B
C#
namespace GFramework.Game.Abstractions.coroutine;
|
|
|
|
/// <summary>
|
|
/// 表示一个可等待的指令接口,用于协程中的等待操作
|
|
/// </summary>
|
|
public interface IYieldInstruction
|
|
{
|
|
/// <summary>
|
|
/// 获取当前等待指令是否已完成
|
|
/// </summary>
|
|
bool IsDone { get; }
|
|
|
|
/// <summary>
|
|
/// 更新等待指令的状态
|
|
/// </summary>
|
|
/// <param name="deltaTime">自上次更新以来的时间间隔(以秒为单位)</param>
|
|
void Update(float deltaTime);
|
|
} |