using GFramework.Game.Abstractions.coroutine; namespace GFramework.Game.coroutine; /// /// 协程上下文类,用于封装协程执行所需的环境信息 /// /// 协程作用域接口实例 /// 协程调度器实例 /// 协程的所有者对象,默认为null public class CoroutineContext(ICoroutineScope scope, CoroutineScheduler scheduler, object? owner = null) { /// /// 获取协程作用域 /// public ICoroutineScope Scope { get; } = scope; /// /// 获取协程调度器 /// public CoroutineScheduler Scheduler { get; } = scheduler; /// /// 获取协程所有者对象 /// public object? Owner { get; } = owner; }