mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
fix: 修复子弹伤害计算并添加命中成功回调
- 在EntityBase.gd中添加takeDamage方法的返回值 - 修改BigLaser.gd中的applyDot延迟时间计算方式并添加succeedToHit方法 - 在BulletBase.gd中完善伤害处理流程,添加命中回调机制
This commit is contained in:
@@ -10,9 +10,9 @@ func ai():
|
||||
position = launcher.texture.global_position
|
||||
func applyDot():
|
||||
hitbox.disabled = true
|
||||
await TickTool.millseconds(50)
|
||||
await TickTool.millseconds(100 / launcher.fields[FieldStore.Entity.ATTACK_SPEED])
|
||||
hitbox.disabled = false
|
||||
await TickTool.millseconds(50)
|
||||
await TickTool.millseconds(100 / launcher.fields[FieldStore.Entity.ATTACK_SPEED])
|
||||
BulletBase.generate(
|
||||
preload("res://components/Bullets/LaserPluse.tscn"),
|
||||
launcher,
|
||||
@@ -20,3 +20,5 @@ func applyDot():
|
||||
rotation
|
||||
)
|
||||
return true
|
||||
func succeedToHit(_dmg: float):
|
||||
fields[FieldStore.Bullet.DAMAGE] *= 1.1
|
||||
|
||||
Reference in New Issue
Block a user