1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

fix(MuyangDog): 修复格挡计数器逻辑错误

将parryCounter.start()判断改为parryCounter.isCooldowned(),并在成功格挡后启动计数器
This commit is contained in:
2026-05-04 22:07:03 +08:00
parent b5c2152d4c
commit edc31d876e
+2 -1
View File
@@ -4,8 +4,9 @@ var parryCounter: CooldownTimer = CooldownTimer.new(3000)
func ai():
super.ai()
if parryCounter.start():
if parryCounter.isCooldowned():
var track = getTrackingAnchor()
var bullet = BulletTool.findClosetBulletCanDamage(track, get_tree(), self , 400)
if is_instance_valid(bullet):
BulletBase.generate(ComponentManager.getBullet("Parrier"), self , track, track.angle_to_point(bullet.position))
parryCounter.start()