mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
17 lines
356 B
GDScript
17 lines
356 B
GDScript
@tool
|
|
class_name ItemStore
|
|
|
|
enum ItemType {
|
|
BASEBALL,
|
|
BASKETBALL
|
|
}
|
|
static var nameMap = {
|
|
ItemType.BASEBALL: "棒球",
|
|
ItemType.BASKETBALL: "篮球"
|
|
}
|
|
static var idMap = {
|
|
ItemType.BASEBALL: "baseball",
|
|
ItemType.BASKETBALL: "basketball"
|
|
}
|
|
static func getTexture(type: ItemType) -> Texture2D:
|
|
return load("res://resources/items/%s.svg" % idMap[type]) |