refactor: 移除调试日志并统一使用日志工具

- 删除多个文件中的 console.log/console.warn/console.error 调试输出
- 将日志输出统一替换为 mLogger 工具,支持调试模式控制
- 清理注释掉的调试代码和空方法体
This commit is contained in:
panw
2026-02-03 16:49:24 +08:00
parent dc746e28da
commit 3a8f015a78
21 changed files with 65 additions and 80 deletions

View File

@@ -278,7 +278,7 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
CView.scheduleRevive(1.0);
}
console.log(`[HeroAtkSystem] Hero waiting to revive from Thorns! Lives left: ${CAttrs.Attrs[Attrs.REVIVE_COUNT]}`);
mLogger.log(this.debugMode, 'HeroAtkSystem', `[HeroAtkSystem] Hero waiting to revive from Thorns! Lives left: ${CAttrs.Attrs[Attrs.REVIVE_COUNT]}`);
return;
}
@@ -286,7 +286,7 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
if (CAttrs.is_master&&CAttrs.Attrs[Attrs.REVIVE_COUNT] <= 0) {
smc.mission.stop_mon_action = true;
oops.message.dispatchEvent(GameEvent.HeroDead, { hero_uuid: CAttrs.hero_uuid});
console.log("[HeroAtkSystem] Hero died from thorns, stopping monster action (spawn/move)");
mLogger.log(this.debugMode, 'HeroAtkSystem', "[HeroAtkSystem] Hero died from thorns, stopping monster action (spawn/move)");
}
this.doDead(caster);
@@ -409,7 +409,7 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
this.onDeath(entity);
if (this.debugMode) {
console.log(`[HeroAtkSystem] ${TAttrsComp.hero_name} 死亡`);
mLogger.log(this.debugMode, 'HeroAtkSystem', `[HeroAtkSystem] ${TAttrsComp.hero_name} 死亡`);
}
}