1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-29 23:41:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/ParryBall.gd
T

23 lines
586 B
GDScript
Raw Normal View History

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
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)