mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-26 21:42:29 +08:00
feat(子弹系统): 完善乾坤剑和格挡子弹的逻辑
添加乾坤剑的追踪和攻击逻辑,包括命中目标后的效果 调整格挡子弹的伤害值和生成气的逻辑 优化子弹动画和碰撞箱设置 为乾坤剑添加基础伤害和穿透属性
This commit is contained in:
@@ -6,10 +6,13 @@ var cycler: CycleTimer
|
||||
func spawn():
|
||||
cycler = launcher.getOrCreateCycleTimer("parry")
|
||||
cycler.host(self )
|
||||
launcher.sprintMultiplier += 1
|
||||
func destroy(_beacuseMap: bool):
|
||||
launcher.sprintMultiplier -= 1
|
||||
func ai():
|
||||
PresetBulletAI.selfRotate(self , 5)
|
||||
hitbox.disabled = !launcher.sprinting
|
||||
func succeedToHit(_dmg: float, entity: EntityBase):
|
||||
hitbox.disabled = !launcher.sprinting # 玩家在冲刺时气的碰撞箱才生效
|
||||
func succeedToHit(_dmg: float, entity: EntityBase): # 当撞到敌人时
|
||||
for bullet in BulletBase.generate(
|
||||
ComponentManager.getBullet("QKSword"),
|
||||
launcher,
|
||||
@@ -19,4 +22,4 @@ func succeedToHit(_dmg: float, entity: EntityBase):
|
||||
if bullet is QKSwordBullet:
|
||||
bullet.position = entity.texture.global_position + MathTool.sampleInRing(50, 200)
|
||||
bullet.tracer = entity
|
||||
bullet.look_at(entity.position)
|
||||
bullet.look_at(entity.getTrackingAnchor()) # 生成的乾坤剑面向敌人
|
||||
|
||||
Reference in New Issue
Block a user