mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(音效/特效): 添加角色死亡音效和血液特效
添加多个音效文件并实现角色死亡时的血液粒子效果 调整冲刺逻辑和数值,修复激光子弹的显示位置 为不同攻击类型添加对应音效,增强游戏表现力
This commit is contained in:
@@ -55,7 +55,7 @@ var inventoryMax = {
|
||||
@export var defaultCooldownUnit: float = 100
|
||||
@export var isBoss: bool = false
|
||||
@export var displayName: String = "未知实体"
|
||||
@export var sprintMultiplier: float = 3
|
||||
@export var sprintMultiplier: float = 5
|
||||
@export var drops: Array[ItemStore.ItemType] = []
|
||||
@export var dropCounts: Array[Vector2] = []
|
||||
@export var appleCount: Vector2i = Vector2(0, 2) # 死亡后掉落的苹果数量
|
||||
@@ -203,10 +203,12 @@ func tryAttack(type: int, needChargeUp: bool = false):
|
||||
attack(type)
|
||||
return state
|
||||
func trySprint():
|
||||
trailing = true
|
||||
playSound("sprint")
|
||||
sprint()
|
||||
sprinting = true
|
||||
await TickTool.until(func(): return !sprinting)
|
||||
trailing = false
|
||||
func tryDie(by: BulletBase):
|
||||
for drop in range(min(len(drops), len(dropCounts))):
|
||||
var item = drops[drop]
|
||||
@@ -220,6 +222,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))
|
||||
EffectController.create(preload("res://components/Effects/DeadBlood.tscn"), texture.global_position).shot()
|
||||
await die()
|
||||
if isPlayer() and UIState.player == self:
|
||||
UIState.setPanel("GameOver")
|
||||
|
||||
Reference in New Issue
Block a user