1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-10 13:47:12 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/QKSword.gd
T
fallingshrimp 97ac580347 feat(子弹系统): 完善乾坤剑和格挡子弹的逻辑
添加乾坤剑的追踪和攻击逻辑,包括命中目标后的效果
调整格挡子弹的伤害值和生成气的逻辑
优化子弹动画和碰撞箱设置
为乾坤剑添加基础伤害和穿透属性
2026-03-19 22:58:50 +08:00

22 lines
599 B
GDScript

extends BulletBase
class_name QKSwordBullet
var tracer: EntityBase
var attackedTracer: bool = false
func ai():
if is_instance_valid(tracer) && !attackedTracer:
look_at(tracer.getTrackingAnchor())
if timeLived() > 1000:
PresetBulletAI.forward(self , rotation) # 前进
hitbox.disabled = false
else:
hitbox.disabled = true
func succeedToHit(_dmg: float, entity: EntityBase):
if entity == tracer:
attackedTracer = true # 只需要命中一次目标就不需要继续前进了
EffectController.create(
ComponentManager.getEffect("CatBoom"),
entity.texture.global_position
).shot()