mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
feat(Bullets): 调整子弹碰撞时的相机震动和反冲效果
增加相机震动强度并优化反冲力计算公式,使用子弹速度和伤害的立方根来计算反冲力,使效果更符合游戏设计需求
This commit is contained in:
@@ -28,8 +28,8 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞
|
||||
eff.modulate = bullet.modulate.blend(bullet.texture.modulate)
|
||||
eff.rotation = position.angle_to_point(bullet.position)
|
||||
eff.shot()
|
||||
CameraManager.shake(200, 250)
|
||||
launcher.impluse((position - bullet.position).normalized() * sqrt(bullet.speed) * 500)
|
||||
CameraManager.shake(250, 300)
|
||||
launcher.impluse((position - bullet.position).normalized() * (bullet.speed * bullet.getDamage()) ** (1.0 / 3) * 250)
|
||||
# 摧毁其他子弹
|
||||
bullet.tryDestroy()
|
||||
var cycler = launcher.getOrCreateCycleTimer("parry", 2000, 100)
|
||||
|
||||
Reference in New Issue
Block a user