refactor: 统一替换内置console日志为可配置化日志系统
1. 将各业务模块中的硬编码console日志替换为自定义Logger模块,新增DEBUG开关控制日志输出 2. 为MissSkillsComp新增道具卡牌使用处理逻辑,支持药水类技能直接给全队施加buff 3. 修复了道具卡牌事件监听绑定错误的问题 4. 新增了hero预制体的meta配置文件 5. 调整了装备预制体的UI布局参数
This commit is contained in:
@@ -15,6 +15,10 @@ import { Timer } from "db://oops-framework/core/common/timer/Timer";
|
||||
import { BuffList } from "../common/config/BuffSet";
|
||||
import { HeroAttrsComp } from "./HeroAttrsComp";
|
||||
import { BuffComp, ActiveBuff } from "./BuffComp";
|
||||
import { mLogger } from "../common/Logger";
|
||||
|
||||
/** Buff 模块调试日志开关 */
|
||||
const DEBUG = false;
|
||||
|
||||
/** 固定步长(秒) */
|
||||
const TICK_STEP = 0.1;
|
||||
@@ -60,7 +64,7 @@ export class BuffSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
if (cfg.duration > 0 && layer.remaining <= 0) {
|
||||
layers.splice(i, 1);
|
||||
anyChanged = true;
|
||||
console.log(`[BuffSystem] buff 到期移除: ${cfg.name}(${buffId}) eid=${e.eid} 剩余层数=${layers.length}`);
|
||||
mLogger.log(DEBUG, "BuffSystem", `buff 到期移除: ${cfg.name}(${buffId}) eid=${e.eid} 剩余层数=${layers.length}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user