mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-23 03:04:29 +08:00
将原有的IGodotArchitectureExtension接口及其实现统一替换为IGodotModule接口, 以提供更清晰、更具扩展性的模块化支持。同时更新了相关字段和方法命名, 使其语义更加准确,提升代码可读性和维护性。
29 lines
823 B
C#
29 lines
823 B
C#
using GFramework.Core.architecture;
|
||
using Godot;
|
||
|
||
namespace GFramework.Godot.architecture;
|
||
|
||
/// <summary>
|
||
/// Godot模块接口,定义了Godot引擎中模块的基本行为和属性
|
||
/// </summary>
|
||
/// <typeparam name="T">架构类型,必须继承自Architecture<T>且具有无参构造函数</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();
|
||
}
|
||
|