mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-03 09:51:53 +08:00
refactor(Statemachine): 优化冷却计时器及攻击冷却管理
重构CooldownTimer类,添加初始化方法支持自定义冷却时间 将EntityBase中的单一冷却计时器改为基于攻击类型的映射管理 简化Wave类中的预设波次数据结构,移除未使用的测试波次
This commit is contained in:
@@ -3,6 +3,9 @@ class_name CooldownTimer
|
||||
var cooldown: float = 100
|
||||
var lastStart: int = 0
|
||||
|
||||
func _init(cd: float = 100):
|
||||
cooldown = cd
|
||||
|
||||
func isCooldowned():
|
||||
return timeSinceLastStart() >= cooldown
|
||||
func start():
|
||||
|
||||
Reference in New Issue
Block a user