mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
feat(战斗系统): 添加攻击速度属性支持
在Weapon.gd中根据实体攻击速度调整冷却时间 在CooldownTimer.gd中新增speedScale属性和centralTime方法
This commit is contained in:
@@ -171,6 +171,7 @@ func playSound(sound: String):
|
||||
await cloned.finished
|
||||
cloned.queue_free()
|
||||
func tryAttack(entity: EntityBase):
|
||||
cooldownTimer.speedScale = entity.fields.get(FieldStore.Entity.ATTACK_SPEED)
|
||||
if cooldownTimer.start():
|
||||
if entity.useEnergy(needEnergy):
|
||||
return await attack(entity)
|
||||
|
||||
Reference in New Issue
Block a user