mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 23:41:54 +08:00
feat(物品系统): 新增沙滩球物品及相关功能
refactor(武器卡片): 调整武器类型和颜色映射 style(UI): 更新武器名称标签样式 fix(实体基础): 修正物品掉落逻辑 perf(音频): 优化音频处理模式 docs(物品存储): 更新物品枚举和映射 build(资源): 添加沙滩球SVG资源文件 chore(资源): 更新篮球和棒球SVG资源
This commit is contained in:
@@ -50,11 +50,13 @@ var inventory = {
|
||||
ItemStore.ItemType.BASEBALL: 500,
|
||||
ItemStore.ItemType.BASKETBALL: 500,
|
||||
ItemStore.ItemType.APPLE: 5,
|
||||
ItemStore.ItemType.BEACHBALL: 0,
|
||||
}
|
||||
var inventoryMax = {
|
||||
ItemStore.ItemType.BASEBALL: INF, # 无限
|
||||
ItemStore.ItemType.BASKETBALL: INF,
|
||||
ItemStore.ItemType.APPLE: 5,
|
||||
ItemStore.ItemType.BEACHBALL: INF,
|
||||
}
|
||||
|
||||
@export var defaultCooldownUnit: float = 100
|
||||
@@ -237,6 +239,7 @@ func tryDie(by: BulletBase):
|
||||
) or isBoss:
|
||||
for i in randi_range(appleCount.x, appleCount.y):
|
||||
ItemDropped.generate(ItemStore.ItemType.APPLE, 1, position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset))
|
||||
ItemDropped.generate(ItemStore.ItemType.BEACHBALL, fields[FieldStore.Entity.MAX_HEALTH], position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset))
|
||||
EffectController.create(preload("res://components/Effects/DeadBlood.tscn"), texture.global_position).shot()
|
||||
await die()
|
||||
if isPlayer() and UIState.player == self:
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
extends CanvasLayer
|
||||
class_name UIState
|
||||
|
||||
@onready var baseball = $"%baseball"
|
||||
@onready var basketball = $"%basketball"
|
||||
@onready var apple = $"%apple"
|
||||
@onready var items = $"%items"
|
||||
@onready var energyLabel: Label = $"%energy"
|
||||
@onready var energyMaxLabel: Label = $"%energyMax"
|
||||
|
||||
@@ -13,6 +13,7 @@ enum TypeTopic {
|
||||
IMPACT,
|
||||
ENERGY,
|
||||
TEMPERATURE,
|
||||
MAGIC,
|
||||
}
|
||||
|
||||
@export var displayName: String = "未命名武器"
|
||||
@@ -50,11 +51,13 @@ enum TypeTopic {
|
||||
TypeTopic.IMPACT: "冲击",
|
||||
TypeTopic.ENERGY: "能量",
|
||||
TypeTopic.TEMPERATURE: "熔融",
|
||||
TypeTopic.MAGIC: "魔法",
|
||||
}
|
||||
@export var typeTopicColorMap = {
|
||||
TypeTopic.IMPACT: Color(),
|
||||
TypeTopic.ENERGY: Color(),
|
||||
TypeTopic.TEMPERATURE: Color(),
|
||||
TypeTopic.MAGIC: Color(),
|
||||
}
|
||||
|
||||
@onready var qualityLabel: Label = $"%quality"
|
||||
|
||||
Reference in New Issue
Block a user