mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
refactor(godot): 重构Godot UI注册表相关接口和类名
- 将IGodotAssetRegistry重命名为IGodotUiRegistry - 将GodotAssetRegistry重命名为GodotUiRegistry - 更新GodotUiFactory中的依赖注入类型 - 为IGodotSceneRegistry接口添加详细的XML文档注释 - 移除GodotUiFactory中不必要的Godot命名空间引用
This commit is contained in:
parent
825a026c8e
commit
3859098b7e
@ -3,4 +3,7 @@ using Godot;
|
||||
|
||||
namespace GFramework.Godot.scene;
|
||||
|
||||
/// <summary>
|
||||
/// Godot场景注册表接口,用于管理PackedScene资源的注册和访问
|
||||
/// </summary>
|
||||
public interface IGodotSceneRegistry : IAssetRegistry<PackedScene>;
|
||||
@ -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>()!;
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
@ -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>;
|
||||
Loading…
x
Reference in New Issue
Block a user