namespace GFramework.Core.Abstractions.controller; /// /// 控制器标记接口,用于标识控制器组件 /// /// /// /// IController 是一个标记接口(Marker Interface),不包含任何方法或属性。 /// 它的作用是标识一个类是控制器,用于协调 Model、System 和 UI 之间的交互。 /// /// /// 架构访问:控制器通常需要访问架构上下文。使用 [ContextAware] 特性 /// 自动生成上下文访问能力: /// /// /// using GFramework.SourceGenerators.Abstractions.rule; /// /// [ContextAware] /// public partial class PlayerController : IController /// { /// public void Initialize() /// { /// // Context 属性由 [ContextAware] 自动生成 /// var playerModel = Context.GetModel<PlayerModel>(); /// var gameSystem = Context.GetSystem<GameSystem>(); /// } /// } /// /// /// 注意: /// /// /// 必须添加 partial 关键字 /// [ContextAware] 特性会自动实现 IContextAware 接口 /// Context 属性提供架构上下文访问 /// /// public interface IController;