refactor(godot): 重构Godot UI注册表相关接口和类名

- 将IGodotAssetRegistry重命名为IGodotUiRegistry
- 将GodotAssetRegistry重命名为GodotUiRegistry
- 更新GodotUiFactory中的依赖注入类型
- 为IGodotSceneRegistry接口添加详细的XML文档注释
- 移除GodotUiFactory中不必要的Godot命名空间引用
This commit is contained in:
GeWuYou 2026-01-18 22:45:41 +08:00
parent 825a026c8e
commit 3859098b7e
4 changed files with 8 additions and 6 deletions

View File

@ -3,4 +3,7 @@ using Godot;
namespace GFramework.Godot.scene;
/// <summary>
/// Godot场景注册表接口用于管理PackedScene资源的注册和访问
/// </summary>
public interface IGodotSceneRegistry : IAssetRegistry<PackedScene>;

View File

@ -1,7 +1,6 @@
using GFramework.Core.extensions;
using GFramework.Core.utility;
using GFramework.Game.Abstractions.ui;
using Godot;
namespace GFramework.Godot.ui;
@ -14,7 +13,7 @@ public class GodotUiFactory : AbstractContextUtility, IUiFactory
/// <summary>
/// UI注册表用于存储和获取PackedScene类型的UI资源
/// </summary>
private IAssetRegistry<PackedScene> _registry = null!;
private IGodotUiRegistry _registry = null!;
/// <summary>
/// 根据指定的UI键创建UI页面实例
@ -44,6 +43,6 @@ public class GodotUiFactory : AbstractContextUtility, IUiFactory
/// </summary>
protected override void OnInit()
{
_registry = this.GetUtility<IAssetRegistry<PackedScene>>()!;
_registry = this.GetUtility<IGodotUiRegistry>()!;
}
}

View File

@ -8,5 +8,5 @@ namespace GFramework.Godot.ui;
/// 继承自KeyValueRegistryBase使用字符串作为键PackedScene作为值进行存储
/// 实现IUiRegistry接口提供UI场景的注册和管理功能
/// </summary>
public class GodotAssetRegistry()
: KeyValueRegistryBase<string, PackedScene>(StringComparer.Ordinal), IGodotAssetRegistry;
public class GodotUiRegistry()
: KeyValueRegistryBase<string, PackedScene>(StringComparer.Ordinal), IGodotUiRegistry;

View File

@ -7,4 +7,4 @@ namespace GFramework.Godot.ui;
/// Godot UI注册表接口用于管理PackedScene类型的UI资源注册和管理
/// 继承自通用UI注册表接口专门针对Godot引擎的PackedScene资源类型
/// </summary>
public interface IGodotAssetRegistry : IAssetRegistry<PackedScene>;
public interface IGodotUiRegistry : IAssetRegistry<PackedScene>;