refactor: 移除调试日志并统一使用日志工具
- 删除多个文件中的 console.log/console.warn/console.error 调试输出 - 将日志输出统一替换为 mLogger 工具,支持调试模式控制 - 清理注释掉的调试代码和空方法体
This commit is contained in:
@@ -76,7 +76,7 @@ export class MissionComp extends CCComp {
|
||||
SpecialMonsterSchedule.forEach((item, index) => {
|
||||
if (!this.spawnedSpecialIndices.has(index) && fightTime >= item.time) {
|
||||
this.spawnedSpecialIndices.add(index);
|
||||
console.log(`[MissionComp] 触发特殊刷怪: ${item.desc}`);
|
||||
mLogger.log(this.debugMode, 'MissionComp', `[MissionComp] 触发特殊刷怪: ${item.desc}`);
|
||||
oops.message.dispatchEvent("SpawnSpecialMonster", {
|
||||
uuid: item.uuid,
|
||||
type: item.type,
|
||||
@@ -170,7 +170,6 @@ export class MissionComp extends CCComp {
|
||||
}
|
||||
|
||||
do_hero_dead(event:any,data:any){
|
||||
// console.log("[MissionComp] do_hero_dead",event,data)
|
||||
// 收到 HeroDead 说明已经没有复活次数了,打开失败界面,等待玩家选择(复活或结束)
|
||||
// oops.message.dispatchEvent(GameEvent.FightEnd,{victory:false}) // 暂时不分发结束事件
|
||||
this.open_Victory(null,true)
|
||||
@@ -197,7 +196,6 @@ do_ad(){
|
||||
// 确保清理上一局的残留实体
|
||||
this.cleanComponents();
|
||||
|
||||
// console.log("[MissionComp] ** 1 ** mission_start")
|
||||
oops.message.dispatchEvent(GameEvent.FightReady)
|
||||
this.node.active=true
|
||||
this.data_init()
|
||||
@@ -277,7 +275,6 @@ do_ad(){
|
||||
this.spawnedSpecialIndices.clear(); // 重置特殊刷怪记录
|
||||
|
||||
// 重置全局属性加成和主角引用 (确保新一局数据干净)
|
||||
// console.log(`[MissionComp] data_init 重置 smc.role 为 null`);
|
||||
// smc.role = null;
|
||||
|
||||
// 重置英雄数据,确保新一局是初始状态
|
||||
|
||||
Reference in New Issue
Block a user