GwWuYou 259c4411c7 refactor(architecture): 重构Godot架构扩展机制为模块机制
将原有的IGodotArchitectureExtension接口及其实现统一替换为IGodotModule接口,
以提供更清晰、更具扩展性的模块化支持。同时更新了相关字段和方法命名,
使其语义更加准确,提升代码可读性和维护性。
2025-12-21 13:31:39 +08:00

29 lines
823 B
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.

using GFramework.Core.architecture;
using Godot;
namespace GFramework.Godot.architecture;
/// <summary>
/// Godot模块接口定义了Godot引擎中模块的基本行为和属性
/// </summary>
/// <typeparam name="T">架构类型必须继承自Architecture&lt;T&gt;且具有无参构造函数</typeparam>
public interface IGodotModule<T> : IArchitectureModule where T : Architecture<T>, new()
{
/// <summary>
/// 获取模块关联的Godot节点
/// </summary>
Node Node { get; }
/// <summary>
/// 当模块被附加到架构时调用
/// </summary>
/// <param name="architecture">要附加到的架构实例</param>
void OnAttach(Architecture<T> architecture);
/// <summary>
/// 当模块从架构分离时调用
/// </summary>
void OnDetach();
}