mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
4e3425eda9
- 将attackstar.svg从UI目录移动到resources/common目录 - 将VerticalColorBar.tscn从UI/Variants目录移动到根components目录 - 将LaserSummoner.tscn从Bullets/Common目录移动到Bullets根目录 - 移除调试日志打印语句 - 优化ItemStore.gd的getTexture方法默认值处理 - 更新相关场景和脚本中的资源引用路径 - 添加FeedFilter调试工具组件 - 优化ComponentManager初始化逻辑
45 lines
1.4 KiB
GDScript
45 lines
1.4 KiB
GDScript
@tool
|
|
extends Node
|
|
class_name ComponentManager
|
|
|
|
static var bullets = {}
|
|
static var characters = {}
|
|
static var effects = {}
|
|
static var feeds = []
|
|
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)
|
|
for i in DirTool.listdir("res://components/Characters"):
|
|
characters[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
|
for i in DirTool.listdir("res://components/Effects"):
|
|
effects[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
|
for i in DirTool.listdir("res://components/Feeds"):
|
|
feeds.append(load(i))
|
|
for i in DirTool.listdir("res://components/UI"):
|
|
uiComponents[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
|
for i in DirTool.listdir("res://themes"):
|
|
themes[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
|
for i in DirTool.listdir("res://resources/items"):
|
|
itemTextures[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
|
static func getBullet(t: String):
|
|
return bullets[t]
|
|
static func getCharacter(t: String):
|
|
return characters[t]
|
|
static func getEffect(t: String):
|
|
return effects[t]
|
|
static func getFeed(i: int):
|
|
return feeds[i]
|
|
static func getUIComponent(t: String):
|
|
return uiComponents[t]
|
|
static func getTheme(t: String):
|
|
return themes[t]
|
|
static func getItemTexture(t: String):
|
|
return itemTextures[t]
|