1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

refactor(ComponentManager): 移除_ready中的init调用并优化初始化逻辑

移除ComponentManager.gd中冗余的_ready方法,改为在MakeFeed.gd中显式调用init
优化资源加载逻辑,确保在使用前完成初始化
This commit is contained in:
2025-09-21 14:52:17 +08:00
parent 84d286e2c5
commit 81651f764c
2 changed files with 1 additions and 3 deletions
+1
View File
@@ -24,6 +24,7 @@ func _ready():
refreshNeedBaseballCount *= 1 + randf_range(GameRule.refreshCountIncreasePercent.x, GameRule.refreshCountIncreasePercent.y)
regenerateCards()
)
ComponentManager.init()
for i in len(ComponentManager.feeds):
var feed = ComponentManager.getFeed(i).instantiate() as Feed
feed.selected.connect(
@@ -10,9 +10,6 @@ static var uiComponents = {}
static var themes = {}
static var itemTextures = {}
func _ready():
init()
static func init():
for i in DirTool.listdir("res://components/Bullets"):
bullets[DirTool.getBasenameWithoutExtension(i)] = load(i)