mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-06 19:57:12 +08:00
refactor(资源管理): 集中资源加载逻辑到ComponentManager
将分散在各处的资源加载逻辑统一到ComponentManager中管理 添加对UI组件、主题、物品纹理和饲料的集中管理 移除SkillIconBase.tscn并迁移到UI目录
This commit is contained in:
@@ -24,9 +24,9 @@ func _ready():
|
||||
refreshNeedBaseballCount *= 1 + randf_range(GameRule.refreshCountIncreasePercent.x, GameRule.refreshCountIncreasePercent.y)
|
||||
regenerateCards()
|
||||
)
|
||||
for feedScene in DirTool.listdir("res://components/Feeds"):
|
||||
print("正在从 %s 加载饲料卡" % feedScene)
|
||||
var feed = load(feedScene).instantiate() as Feed
|
||||
for i in len(ComponentManager.feeds):
|
||||
print("正在从 %s 加载饲料卡" % ComponentManager.feeds[i])
|
||||
var feed = ComponentManager.getFeed(i).instantiate() as Feed
|
||||
feed.selected.connect(
|
||||
func(applied: bool):
|
||||
if applied:
|
||||
|
||||
Reference in New Issue
Block a user