fix: 修复组件销毁时事件解绑和空引用问题并添加任务界面

- 在多个组件的onDestroy方法中添加节点有效性检查,防止无效节点上解绑事件
- 修复MissionComp中任务启动逻辑,改为通过UI打开方式触发MissionStart事件
- 添加新的任务界面(UIID.Mission)及相关配置
- 修复MissionCardComp中Map未初始化导致的空引用问题
- 优化按钮事件绑定和解绑逻辑,增加空值检查
This commit is contained in:
panw
2026-05-08 14:14:38 +08:00
parent c70e3bbb4d
commit 07aec09283
16 changed files with 19665 additions and 19580 deletions

View File

@@ -98,9 +98,6 @@ export class MissionHeroCompComp extends CCComp {
// 清理全部监听
oops.message.off(GameEvent.CallHero,this.call_hero,this)
oops.message.off("PhasePrepareStart",this.fight_ready,this)
oops.message.off(GameEvent.FightReady,this.fight_ready,this)
oops.message.off(GameEvent.Zhaohuan,this.zhao_huan,this)
oops.message.off(GameEvent.MissionEnd,this.clear_heros,this)
}
start() {