mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-07 04:07:13 +08:00
refactor(武器系统): 重构武器冷却和攻击逻辑
- 将CooldownTimer的startCooldown方法重命名为更简洁的start - 为EntityBase添加weaponStore节点管理武器 - 修改武器攻击逻辑,现在由Weapon类自身处理冷却和攻击 - 调整武器卡片的UI布局和描述居中显示 - 为Rooster角色添加预设武器
This commit is contained in:
@@ -5,7 +5,7 @@ var lastStart: int = 0
|
||||
|
||||
func isCooldowned():
|
||||
return WorldManager.getTime() - lastStart >= cooldown
|
||||
func startCooldown():
|
||||
func start():
|
||||
var state = isCooldowned()
|
||||
if state:
|
||||
lastStart = WorldManager.getTime()
|
||||
|
||||
Reference in New Issue
Block a user