From 7da12c05cec8333b3302ec1675530a08025e857d Mon Sep 17 00:00:00 2001
From: GwWuYou <95328647+GeWuYou@users.noreply.github.com>
Date: Tue, 16 Dec 2025 21:40:10 +0800
Subject: [PATCH] =?UTF-8?q?refactor(system):=20=E5=B0=86=E8=B5=84=E6=BA=90?=
=?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=96=B9=E6=B3=95=E8=AE=BF=E9=97=AE=E7=BA=A7?=
=?UTF-8?q?=E5=88=AB=E4=BB=8Eprivate=E6=8F=90=E5=8D=87=E4=B8=BAprotected?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修改RegisterScene方法的访问修饰符从private为protected
- 修改RegisterResource方法的访问修饰符从private为protected
- 允许子类继承并重写资源注册逻辑
- 提高系统扩展性和代码复用性
---
GFramework.Core.Godot/system/AbstractResourceFactorySystem.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/GFramework.Core.Godot/system/AbstractResourceFactorySystem.cs b/GFramework.Core.Godot/system/AbstractResourceFactorySystem.cs
index 3205f7b..ffd2d74 100644
--- a/GFramework.Core.Godot/system/AbstractResourceFactorySystem.cs
+++ b/GFramework.Core.Godot/system/AbstractResourceFactorySystem.cs
@@ -51,7 +51,7 @@ public abstract class AbstractResourceFactorySystem : AbstractSystem, IResourceF
/// 场景节点类型,必须继承自Node
/// 场景在资产目录中的键名
/// 是否需要预加载该场景资源
- private void RegisterScene(
+ protected void RegisterScene(
string sceneKey,
bool preload = false)
where T : Node
@@ -72,7 +72,7 @@ public abstract class AbstractResourceFactorySystem : AbstractSystem, IResourceF
/// 资源在资产目录中的键名
/// 是否需要复制资源实例
/// 是否需要预加载该资源
- private void RegisterResource(
+ protected void RegisterResource(
string resourceKey,
bool duplicate = false,
bool preload = false)