mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 00:11:54 +08:00
feat(子弹系统): 添加SPRINT运动类型并处理碰撞逻辑
为子弹系统新增SPRINT运动类型,并在Parrier子弹中处理其碰撞逻辑。当SPRINT类型子弹碰撞时,会销毁子弹并使发射者速度反向衰减。
This commit is contained in:
@@ -54,6 +54,9 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞
|
||||
bullet.tryDestroy()
|
||||
elif bullet.motionType == BulletBase.MotionType.SWING:
|
||||
bullet.hitbox.disabled = true
|
||||
elif bullet.motionType == BulletBase.MotionType.SPRINT:
|
||||
bullet.tryDestroy()
|
||||
bullet.launcher.velocity *= -0.1
|
||||
elif bullet.motionType == BulletBase.MotionType.SUMMON || bullet.motionType == BulletBase.MotionType.MAGIC:
|
||||
launcher.storeEnergy(sqrt(bullet.baseDamage))
|
||||
var cycler = launcher.getOrCreateCycleTimer("parry", 2000, 100)
|
||||
|
||||
Reference in New Issue
Block a user