fix(英雄属性组件): 冰冻状态下暂停技能冷却时间刷新

修复英雄处于冰冻状态时技能冷却时间仍然减少的问题。在 updateCD 方法开始时检查冰冻状态,若为冰冻则直接返回,确保技能 CD 暂停刷新。
This commit is contained in:
panw
2026-04-15 16:39:44 +08:00
parent bf799a84fe
commit 53523d8ccb

View File

@@ -121,6 +121,9 @@ export class HeroAttrsComp extends ecs.Comp {
}
updateCD(dt: number){
// 如果处于冰冻状态,则技能 CD 暂停刷新
if (this.isFrost()) return;
for (const key in this.skills) {
const skill = this.skills[key];
if (!skill) continue;