2026-03-17 22:58:04 +08:00
|
|
|
extends BulletBase
|
|
|
|
|
class_name ParryBallBullet
|
|
|
|
|
|
|
|
|
|
var cycler: CycleTimer
|
|
|
|
|
|
|
|
|
|
func spawn():
|
|
|
|
|
cycler = launcher.getOrCreateCycleTimer("parry")
|
|
|
|
|
cycler.host(self )
|
|
|
|
|
func ai():
|
|
|
|
|
PresetBulletAI.selfRotate(self , 5)
|
|
|
|
|
hitbox.disabled = !launcher.sprinting
|
2026-03-18 22:39:44 +08:00
|
|
|
func succeedToHit(_dmg: float, entity: EntityBase):
|
|
|
|
|
for bullet in BulletBase.generate(
|
|
|
|
|
ComponentManager.getBullet("QKSword"),
|
|
|
|
|
launcher,
|
|
|
|
|
entity.position,
|
|
|
|
|
0
|
|
|
|
|
):
|
|
|
|
|
if bullet is QKSwordBullet:
|
|
|
|
|
bullet.position = entity.texture.global_position + MathTool.sampleInRing(50, 200)
|
|
|
|
|
bullet.tracer = entity
|
|
|
|
|
bullet.look_at(entity.position)
|