1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00
Files
Dog-Lynx-And-HCN/scripts/Tools/ItemStore.gd
T

28 lines
581 B
GDScript
Raw Normal View History

@tool
2025-09-21 13:56:50 +08:00
extends Node
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:
2025-09-21 13:56:50 +08:00
return ComponentManager.getItemTexture(idMap.get(type, "baseball"))