refactor(map): 移除任务卡片组件中的等级更新事件监听

清理未使用的等级更新事件处理,避免潜在的内存泄漏
This commit is contained in:
panw
2026-01-28 17:22:16 +08:00
parent 624c8a6c4e
commit 4d96165b2d

View File

@@ -65,7 +65,7 @@ export class MissionCardComp extends CCComp {
oops.message.on(GameEvent.MissionStart, this.onMissionStart, this);
oops.message.on(GameEvent.MissionEnd, this.onMissionEnd, this);
oops.message.on(GameEvent.ToCallFriend, this.onCallFriend, this);
oops.message.on(GameEvent.CanUpdateLv, this.onLevelUp, this);
// oops.message.on(GameEvent.CanUpdateLv, this.onLevelUp, this);
}
@@ -80,7 +80,7 @@ export class MissionCardComp extends CCComp {
oops.message.off(GameEvent.MissionStart, this.onMissionStart, this);
oops.message.off(GameEvent.MissionEnd, this.onMissionEnd, this);
oops.message.off(GameEvent.ToCallFriend, this.onCallFriend, this);
oops.message.off(GameEvent.CanUpdateLv, this.onLevelUp, this);
// oops.message.off(GameEvent.CanUpdateLv, this.onLevelUp, this);
this.ent.destroy();
}