1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00

fix(EntityBase): 修正伤害处理中healthChanged信号触发顺序

refactor(Rooster): 更新武器配置,添加新武器并调整顺序
This commit is contained in:
2025-09-29 22:38:39 +08:00
parent c5d58a14f7
commit 2dca35f4fd
2 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -229,8 +229,8 @@ func takeDamage(bullet: BulletBase, crit: bool):
storeEnergy(damage * -0.5)
position += Vector2.from_angle(bullet.position.angle_to_point(position)) * bullet.knockback
hit.emit(damage, bullet, crit)
healthChanged.emit(health)
health -= damage
healthChanged.emit(health)
DamageLabel.create(damage, crit || perfectMiss, damageAnchor.global_position + MathTool.randv2_range(GameRule.damageLabelSpawnOffset))
if isBoss and bullet.launcher.isPlayer():
bullet.launcher.setBoss(self)