2026-05-04 21:34:57 +08:00
|
|
|
extends PlayerBase
|
|
|
|
|
|
2026-05-04 21:39:56 +08:00
|
|
|
var parryCounter: CooldownTimer = CooldownTimer.new(3000)
|
2026-05-04 21:34:57 +08:00
|
|
|
|
|
|
|
|
func ai():
|
|
|
|
|
super.ai()
|
2026-05-04 22:07:03 +08:00
|
|
|
if parryCounter.isCooldowned():
|
2026-05-04 21:34:57 +08:00
|
|
|
var track = getTrackingAnchor()
|
2026-05-05 06:54:09 +08:00
|
|
|
var bullet = BulletTool.findClosetBulletCanDamage(track, get_tree(), self , 300)
|
2026-05-04 21:34:57 +08:00
|
|
|
if is_instance_valid(bullet):
|
|
|
|
|
BulletBase.generate(ComponentManager.getBullet("Parrier"), self , track, track.angle_to_point(bullet.position))
|
2026-05-04 22:07:03 +08:00
|
|
|
parryCounter.start()
|