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

@@ -9,10 +9,12 @@ import { SDataCom } from "./SDataCom";
import { SMoveDataComp } from "../skill/SMoveComp";
import { HeroViewComp } from "../hero/HeroViewComp";
import { smc } from "../common/SingletonModuleComp";
import { mLogger } from "../common/Logger";
/** Skill 模块 */
@ecs.register(`Skill`)
export class Skill extends ecs.Entity {
private debugMode: boolean = false;
/** 多键对象池Map<prefabPath, NodePool> */
static pools: Map<string, NodePool> = new Map();
@@ -57,7 +59,7 @@ export class Skill extends ecs.Entity {
const config = SkillSet[s_uuid];
if (!config) {
console.error("[Skill] 技能配置不存在:", s_uuid);
mLogger.error(this.debugMode, 'Skill', "[Skill] 技能配置不存在:", s_uuid);
return;
}
@@ -65,12 +67,10 @@ export class Skill extends ecs.Entity {
const path = `game/skill/atk/${config.sp_name}`;
const prefab:Prefab = oops.res.get(path, Prefab);
if (!prefab) {
console.error("[Skill] 预制体加载失败:", path);
mLogger.error(this.debugMode, 'Skill', "[Skill] 预制体加载失败:", path);
return;
}
// console.log("load skill startPos",startPos)
const node: Node = instantiate(prefab);
// console.log("load skill node",node)
var scene = smc.map.MapView.scene;
node.parent = scene.entityLayer!.node!.getChildByName("SKILL")!;
// 设置节点属性