GeWuYou fb14d7122c docs(style): 更新文档中的命名空间导入格式
- 将所有小写的命名空间导入更正为首字母大写格式
- 统一 GFramework 框架的命名空间引用规范
- 修复 core、ecs、godot 等模块的命名空间导入错误
- 标准化文档示例代码中的 using 语句格式
- 确保所有文档中的命名空间引用保持一致性
- 更新 global using 语句以匹配正确的命名空间格式
2026-03-10 07:18:49 +08:00

38 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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