1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Tools/ItemStore.gd
T
fallingshrimp 4a66a1754e refactor(场景): 移除未使用的节点和脚本依赖
清理World场景中未使用的Node节点及其关联脚本,同时简化ItemStore类的继承关系
2025-09-21 14:17:43 +08:00

27 lines
568 B
GDScript

@tool
class_name ItemStore
enum ItemType {
BASEBALL,
BASKETBALL,
APPLE,
BEACHBALL,
SOUL,
}
static var nameMap = {
ItemType.BASEBALL: "棒球",
ItemType.BASKETBALL: "篮球",
ItemType.APPLE: "苹果",
ItemType.BEACHBALL: "沙滩球",
ItemType.SOUL: "灵魂",
}
static var idMap = {
ItemType.BASEBALL: "baseball",
ItemType.BASKETBALL: "basketball",
ItemType.APPLE: "apple",
ItemType.BEACHBALL: "beachball",
ItemType.SOUL: "soul",
}
static func getTexture(type: ItemType) -> Texture2D:
return ComponentManager.getItemTexture(idMap.get(type, "baseball"))