mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
refactor(godot): 重构资源工厂系统架构
- 移除 IArchitecturePhaseAware 接口依赖 - 将 OnArchitecturePhase 方法改为重写基类方法 - 添加 Godot 模块命名空间占位类型 - 移除项目中未使用的 NUnit 包引用
This commit is contained in:
parent
f620dea073
commit
0599f289f0
@ -0,0 +1,6 @@
|
|||||||
|
namespace GFramework.Godot.SourceGenerators.Abstractions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Godot 模块命名空间占位类型
|
||||||
|
/// </summary>
|
||||||
|
internal sealed class GodotModuleMarker;
|
||||||
@ -1,4 +1,3 @@
|
|||||||
using GFramework.Core.Abstractions.architecture;
|
|
||||||
using GFramework.Core.Abstractions.enums;
|
using GFramework.Core.Abstractions.enums;
|
||||||
using GFramework.Core.system;
|
using GFramework.Core.system;
|
||||||
using GFramework.Game.Abstractions.assets;
|
using GFramework.Game.Abstractions.assets;
|
||||||
@ -11,7 +10,7 @@ namespace GFramework.Godot.assets;
|
|||||||
/// 资源工厂系统抽象基类,用于统一管理各类资源的创建与预加载逻辑。
|
/// 资源工厂系统抽象基类,用于统一管理各类资源的创建与预加载逻辑。
|
||||||
/// 提供注册场景和资源的方法,并通过依赖的资源加载系统和资产目录系统完成实际资源的获取与构造。
|
/// 提供注册场景和资源的方法,并通过依赖的资源加载系统和资产目录系统完成实际资源的获取与构造。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class AbstractResourceFactorySystem : AbstractSystem, IResourceFactorySystem, IArchitecturePhaseAware
|
public abstract class AbstractResourceFactorySystem : AbstractSystem, IResourceFactorySystem
|
||||||
{
|
{
|
||||||
private IAssetCatalogSystem? _assetCatalogSystem;
|
private IAssetCatalogSystem? _assetCatalogSystem;
|
||||||
private ResourceFactory.Registry? _registry;
|
private ResourceFactory.Registry? _registry;
|
||||||
@ -22,7 +21,7 @@ public abstract class AbstractResourceFactorySystem : AbstractSystem, IResourceF
|
|||||||
/// 在架构阶段发生变化时执行相应的处理逻辑。
|
/// 在架构阶段发生变化时执行相应的处理逻辑。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="phase">当前的架构阶段</param>
|
/// <param name="phase">当前的架构阶段</param>
|
||||||
public void OnArchitecturePhase(ArchitecturePhase phase)
|
public override void OnArchitecturePhase(ArchitecturePhase phase)
|
||||||
{
|
{
|
||||||
if (phase == ArchitecturePhase.Ready)
|
if (phase == ArchitecturePhase.Ready)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -110,7 +110,4 @@
|
|||||||
<AdditionalFiles Remove="AnalyzerReleases.Shipped.md"/>
|
<AdditionalFiles Remove="AnalyzerReleases.Shipped.md"/>
|
||||||
<AdditionalFiles Remove="AnalyzerReleases.Unshipped.md"/>
|
<AdditionalFiles Remove="AnalyzerReleases.Unshipped.md"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="NUnit" Version="4.4.0"/>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user