From 00704b7ec29435b7c13d528b8bbe9b922ee99cb5 Mon Sep 17 00:00:00 2001
From: GwWuYou <95328647+GeWuYou@users.noreply.github.com>
Date: Sun, 28 Dec 2025 13:34:20 +0800
Subject: [PATCH] =?UTF-8?q?refactor(architecture):=20=E9=87=8D=E6=9E=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=93=E6=9E=84=E5=B9=B6=E7=A7=BB=E9=99=A4?=
=?UTF-8?q?=E6=8A=BD=E8=B1=A1=E5=B1=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 移除 GFramework.Godot.Abstractions 项目及其所有配置文件
- 将抽象接口直接合并到 GFramework.Godot 项目中
- 更新项目引用关系,移除不必要的抽象层依赖
- 调整命名空间引用,统一使用 GFramework.Godot.architecture
- 简化模块参数命名,提升代码可读性
- 更新解决方案配置,移除已删除的项目配置
---
.../GFramework.Game.Abstractions.csproj | 2 +-
.../Directory.Build.props | 24 ------------------
.../GFramework.Godot.Abstractions.csproj | 25 -------------------
GFramework.Godot/GFramework.Godot.csproj | 2 --
.../architecture/AbstractArchitecture.cs | 1 -
.../architecture/AbstractGodotModule.cs | 5 ++--
.../architecture/IGodotModule.cs | 4 ++-
.../assets/AbstractResourceFactorySystem.cs | 2 +-
.../assets/IResourceLoadSystem.cs | 5 ++--
.../system/AbstractAudioManagerSystem.cs | 3 +--
.../system/IAudioManagerSystem.cs | 3 ++-
GFramework.sln | 6 -----
12 files changed, 12 insertions(+), 70 deletions(-)
delete mode 100644 GFramework.Godot.Abstractions/Directory.Build.props
delete mode 100644 GFramework.Godot.Abstractions/GFramework.Godot.Abstractions.csproj
rename {GFramework.Godot.Abstractions => GFramework.Godot}/architecture/IGodotModule.cs (87%)
rename {GFramework.Godot.Abstractions => GFramework.Godot}/assets/IResourceLoadSystem.cs (96%)
rename {GFramework.Godot.Abstractions => GFramework.Godot}/system/IAudioManagerSystem.cs (99%)
diff --git a/GFramework.Game.Abstractions/GFramework.Game.Abstractions.csproj b/GFramework.Game.Abstractions/GFramework.Game.Abstractions.csproj
index fc12664..51d9a4a 100644
--- a/GFramework.Game.Abstractions/GFramework.Game.Abstractions.csproj
+++ b/GFramework.Game.Abstractions/GFramework.Game.Abstractions.csproj
@@ -11,7 +11,7 @@
enable
-
+
diff --git a/GFramework.Godot.Abstractions/Directory.Build.props b/GFramework.Godot.Abstractions/Directory.Build.props
deleted file mode 100644
index 1e6c3bf..0000000
--- a/GFramework.Godot.Abstractions/Directory.Build.props
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- netstandard2.0
- true
- true
-
- preview
-
-
-
- all
- runtime; build; native; contentfiles; analyzers
-
-
- all
- runtime; build; native; contentfiles; analyzers
-
-
-
diff --git a/GFramework.Godot.Abstractions/GFramework.Godot.Abstractions.csproj b/GFramework.Godot.Abstractions/GFramework.Godot.Abstractions.csproj
deleted file mode 100644
index 12bbbed..0000000
--- a/GFramework.Godot.Abstractions/GFramework.Godot.Abstractions.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
- false
- true
- T:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute
- enable
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/GFramework.Godot/GFramework.Godot.csproj b/GFramework.Godot/GFramework.Godot.csproj
index de3a586..b33a06e 100644
--- a/GFramework.Godot/GFramework.Godot.csproj
+++ b/GFramework.Godot/GFramework.Godot.csproj
@@ -14,9 +14,7 @@
-
-
diff --git a/GFramework.Godot/architecture/AbstractArchitecture.cs b/GFramework.Godot/architecture/AbstractArchitecture.cs
index 6403e60..49943ab 100644
--- a/GFramework.Godot/architecture/AbstractArchitecture.cs
+++ b/GFramework.Godot/architecture/AbstractArchitecture.cs
@@ -1,6 +1,5 @@
using GFramework.Core.architecture;
using GFramework.Core.constants;
-using GFramework.Godot.Abstractions.architecture;
using GFramework.Godot.extensions;
using Godot;
diff --git a/GFramework.Godot/architecture/AbstractGodotModule.cs b/GFramework.Godot/architecture/AbstractGodotModule.cs
index 13bd4ce..dea4c9a 100644
--- a/GFramework.Godot/architecture/AbstractGodotModule.cs
+++ b/GFramework.Godot/architecture/AbstractGodotModule.cs
@@ -1,6 +1,5 @@
using GFramework.Core.Abstractions.architecture;
using GFramework.Core.architecture;
-using GFramework.Godot.Abstractions.architecture;
using Godot;
namespace GFramework.Godot.architecture;
@@ -19,8 +18,8 @@ public abstract class AbstractGodotModule : IGodotModule
/// 当架构阶段发生变化时调用此方法
///
/// 当前的架构阶段
- /// 架构实例
- public virtual void OnPhase(ArchitecturePhase phase, IArchitecture arch)
+ /// 架构实例
+ public virtual void OnPhase(ArchitecturePhase phase, IArchitecture architecture)
{
}
diff --git a/GFramework.Godot.Abstractions/architecture/IGodotModule.cs b/GFramework.Godot/architecture/IGodotModule.cs
similarity index 87%
rename from GFramework.Godot.Abstractions/architecture/IGodotModule.cs
rename to GFramework.Godot/architecture/IGodotModule.cs
index 7fe6e06..01a15b8 100644
--- a/GFramework.Godot.Abstractions/architecture/IGodotModule.cs
+++ b/GFramework.Godot/architecture/IGodotModule.cs
@@ -1,6 +1,8 @@
using GFramework.Core.Abstractions.architecture;
+using GFramework.Core.architecture;
+using Godot;
-namespace GFramework.Godot.Abstractions.architecture;
+namespace GFramework.Godot.architecture;
///
/// Godot模块接口,定义了Godot引擎中模块的基本行为和属性
diff --git a/GFramework.Godot/assets/AbstractResourceFactorySystem.cs b/GFramework.Godot/assets/AbstractResourceFactorySystem.cs
index 451e5b6..ba727cd 100644
--- a/GFramework.Godot/assets/AbstractResourceFactorySystem.cs
+++ b/GFramework.Godot/assets/AbstractResourceFactorySystem.cs
@@ -1,6 +1,6 @@
using GFramework.Core.Abstractions.architecture;
using GFramework.Core.system;
-using GFramework.Game.assets;
+using GFramework.Game.Abstractions.assets;
using GFramework.Godot.Abstractions.assets;
using Godot;
diff --git a/GFramework.Godot.Abstractions/assets/IResourceLoadSystem.cs b/GFramework.Godot/assets/IResourceLoadSystem.cs
similarity index 96%
rename from GFramework.Godot.Abstractions/assets/IResourceLoadSystem.cs
rename to GFramework.Godot/assets/IResourceLoadSystem.cs
index 50a2e6e..a196200 100644
--- a/GFramework.Godot.Abstractions/assets/IResourceLoadSystem.cs
+++ b/GFramework.Godot/assets/IResourceLoadSystem.cs
@@ -1,7 +1,6 @@
-using System;
-using System.Collections.Generic;
-using GFramework.Core.Abstractions.system;
+using GFramework.Core.Abstractions.system;
using GFramework.Game.Abstractions.assets;
+using Godot;
namespace GFramework.Godot.Abstractions.assets;
diff --git a/GFramework.Godot/system/AbstractAudioManagerSystem.cs b/GFramework.Godot/system/AbstractAudioManagerSystem.cs
index 38fc485..288b072 100644
--- a/GFramework.Godot/system/AbstractAudioManagerSystem.cs
+++ b/GFramework.Godot/system/AbstractAudioManagerSystem.cs
@@ -1,7 +1,6 @@
using GFramework.Core.system;
-using GFramework.Game.assets;
+using GFramework.Game.Abstractions.assets;
using GFramework.Godot.Abstractions.assets;
-using GFramework.Godot.Abstractions.system;
using Godot;
namespace GFramework.Godot.system;
diff --git a/GFramework.Godot.Abstractions/system/IAudioManagerSystem.cs b/GFramework.Godot/system/IAudioManagerSystem.cs
similarity index 99%
rename from GFramework.Godot.Abstractions/system/IAudioManagerSystem.cs
rename to GFramework.Godot/system/IAudioManagerSystem.cs
index 0c6427d..209297c 100644
--- a/GFramework.Godot.Abstractions/system/IAudioManagerSystem.cs
+++ b/GFramework.Godot/system/IAudioManagerSystem.cs
@@ -1,6 +1,7 @@
using GFramework.Core.Abstractions.system;
+using Godot;
-namespace GFramework.Godot.Abstractions.system;
+namespace GFramework.Godot.system;
///
/// 音频管理器系统接口,用于统一管理背景音乐和音效的播放
diff --git a/GFramework.sln b/GFramework.sln
index 7953d3f..54e8433 100644
--- a/GFramework.sln
+++ b/GFramework.sln
@@ -22,8 +22,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFramework.SourceGenerators
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFramework.Core.Abstractions", "GFramework.Core.Abstractions\GFramework.Core.Abstractions.csproj", "{31BA9F62-153A-4943-A8A0-7571FC7D5FEE}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFramework.Godot.Abstractions", "GFramework.Godot.Abstractions\GFramework.Godot.Abstractions.csproj", "{EFE2EF31-CEAC-4BFD-851B-5E00FEBC945D}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFramework.Game.Abstractions", "GFramework.Game.Abstractions\GFramework.Game.Abstractions.csproj", "{E20DBA4C-CEB9-4184-B614-5A99A9AE4472}"
EndProject
Global
@@ -76,10 +74,6 @@ Global
{31BA9F62-153A-4943-A8A0-7571FC7D5FEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{31BA9F62-153A-4943-A8A0-7571FC7D5FEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{31BA9F62-153A-4943-A8A0-7571FC7D5FEE}.Release|Any CPU.Build.0 = Release|Any CPU
- {EFE2EF31-CEAC-4BFD-851B-5E00FEBC945D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EFE2EF31-CEAC-4BFD-851B-5E00FEBC945D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EFE2EF31-CEAC-4BFD-851B-5E00FEBC945D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EFE2EF31-CEAC-4BFD-851B-5E00FEBC945D}.Release|Any CPU.Build.0 = Release|Any CPU
{E20DBA4C-CEB9-4184-B614-5A99A9AE4472}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E20DBA4C-CEB9-4184-B614-5A99A9AE4472}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E20DBA4C-CEB9-4184-B614-5A99A9AE4472}.Release|Any CPU.ActiveCfg = Release|Any CPU