1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-10 21:57:12 +08:00

feat(物品系统): 新增灵魂物品类型及相关功能

- 在ItemStore.gd中添加SOUL物品类型及其映射
- 在EntityBase.gd中为物品栏添加SOUL类型及其上限
- 新增灵魂物品的SVG图标及导入配置
- 为角色(KukeMC, Bear, Chick)添加灵魂掉落配置
- 在武器卡片界面添加灵魂提炼和镶嵌按钮
This commit is contained in:
2025-09-19 22:38:25 +08:00
parent fcfa648b86
commit ac7183e78b
8 changed files with 73 additions and 6 deletions
+2
View File
@@ -57,12 +57,14 @@ var inventory = {
ItemStore.ItemType.BASKETBALL: 500,
ItemStore.ItemType.APPLE: 5,
ItemStore.ItemType.BEACHBALL: 0,
ItemStore.ItemType.SOUL: 0,
}
var inventoryMax = {
ItemStore.ItemType.BASEBALL: INF, # 无限
ItemStore.ItemType.BASKETBALL: INF,
ItemStore.ItemType.APPLE: 5,
ItemStore.ItemType.BEACHBALL: INF,
ItemStore.ItemType.SOUL: INF,
}
@export var defaultCooldownUnit: float = 100
+6 -3
View File
@@ -5,19 +5,22 @@ enum ItemType {
BASEBALL,
BASKETBALL,
APPLE,
BEACHBALL
BEACHBALL,
SOUL,
}
static var nameMap = {
ItemType.BASEBALL: "棒球",
ItemType.BASKETBALL: "篮球",
ItemType.APPLE: "苹果",
ItemType.BEACHBALL: "沙滩球"
ItemType.BEACHBALL: "沙滩球",
ItemType.SOUL: "灵魂",
}
static var idMap = {
ItemType.BASEBALL: "baseball",
ItemType.BASKETBALL: "basketball",
ItemType.APPLE: "apple",
ItemType.BEACHBALL: "beachball"
ItemType.BEACHBALL: "beachball",
ItemType.SOUL: "soul",
}
static func getTexture(type: ItemType) -> Texture2D:
return load("res://resources/items/%s.svg" % idMap[type])