mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-30 07:51:54 +08:00
feat(战斗系统): 添加实体惯性系统并改进击退效果
为实体添加惯性系统,包括inertia属性和impluse方法 修改Parrier子弹碰撞时的击退逻辑,使用平方根计算更真实的冲击效果 调整Wave测试数据,在非发布版本使用测试Boss数据
This commit is contained in:
@@ -29,7 +29,7 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞
|
||||
eff.rotation = position.angle_to_point(bullet.position)
|
||||
eff.shot()
|
||||
CameraManager.shake(200, 250)
|
||||
launcher.position -= (bullet.position - position).normalized() * 50
|
||||
launcher.impluse((position - bullet.position).normalized() * sqrt(bullet.speed) * 500)
|
||||
# 摧毁其他子弹
|
||||
bullet.tryDestroy()
|
||||
var cycler = launcher.getOrCreateCycleTimer("parry", 2000, 100)
|
||||
|
||||
Reference in New Issue
Block a user