mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
edc31d876e
将parryCounter.start()判断改为parryCounter.isCooldowned(),并在成功格挡后启动计数器
13 lines
423 B
GDScript
13 lines
423 B
GDScript
extends PlayerBase
|
|
|
|
var parryCounter: CooldownTimer = CooldownTimer.new(3000)
|
|
|
|
func ai():
|
|
super.ai()
|
|
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()
|