1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-30 07:51:54 +08:00

fix: 修复子弹伤害计算并添加命中成功回调

- 在EntityBase.gd中添加takeDamage方法的返回值
- 修改BigLaser.gd中的applyDot延迟时间计算方式并添加succeedToHit方法
- 在BulletBase.gd中完善伤害处理流程,添加命中回调机制
This commit is contained in:
2025-08-28 15:53:39 +08:00
parent 766a894879
commit ee86fca442
3 changed files with 9 additions and 3 deletions
+1
View File
@@ -151,6 +151,7 @@ func takeDamage(bullet: BulletBase, crit: bool):
bullet.launcher.storeEnergy(energy * 0.35)
bullet.launcher.setBoss(null)
tryDie(bullet)
return damage
func collectItem(itemType: ItemStore.ItemType, amount: int):
inventory[itemType] += amount
playSound("collect")