1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-09 13:17:12 +08:00

refactor(武器系统): 优化武器攻击逻辑和能量检查

- 将武器攻击前的条件检查提取为独立方法 canAttackBy
- 重构能量检查逻辑,增加 isEnergyEnough 方法
- 简化公鸡角色的输入处理,合并重复代码为 tryLaunch 方法
- 调整钢管武器的冷却时间为 3000.0
This commit is contained in:
2026-02-05 20:52:04 +08:00
parent d1bf911c79
commit e1ac836497
4 changed files with 34 additions and 42 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ storeType = {
descriptionTemplate = "按住蓄力扔出钢管,蓄力越久伤害越高。
基础伤害:$atk,蓄力倍率:$charge"
needEnergy = 2.0
cooldown = 1000.0
cooldown = 3000.0
[node name="avatar" parent="container/info" index="0"]
texture = ExtResource("2_mmtf8")