perf: 移除调试日志并统一调试模式控制

- 将 HeroAttrsComp 中的 console.log 改为注释以提升性能
- 将 HeroViewComp 的 debugMode 默认值设为 false 并移除冗余日志
- 在 SkillView 中统一添加 debugMode 控制,替换直接 console 调用
- 在 MissionCardComp 中添加调试日志以跟踪卡牌应用效果
This commit is contained in:
panw
2026-02-03 10:36:41 +08:00
parent 031b91311a
commit c07678f31f
4 changed files with 51 additions and 19 deletions

View File

@@ -249,7 +249,7 @@ export class HeroAttrsComp extends ecs.Comp {
this.hp = Math.max(0, Math.min(this.hp, this.Attrs[Attrs.HP_MAX]));
this.dirty_hp = true; // ✅ 仅标记需要更新
smc.updateHeroInfo(this);
console.log(`[HeroAttrs] HP变更: ${this.hero_name}, 变化=${addValue.toFixed(1)}, ${oldHp.toFixed(1)} -> ${this.hp.toFixed(1)}`);
// console.log(`[HeroAttrs] HP变更: ${this.hero_name}, 变化=${addValue.toFixed(1)}, ${oldHp.toFixed(1)} -> ${this.hp.toFixed(1)}`);
}
add_mp(value:number,isValue:boolean){
const oldMp = this.mp;