diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua index 7995113efc..5f667452c2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua @@ -547,7 +547,16 @@ function FightPointPassMainPanel:OnShow() -- 刷新关卡按钮状态 this.SetFightBtnText() - + local loadMapName = fightLevelConfig[FightPointPassManager.curOpenFight].BG + LogError("@@@@@@"..loadMapName) + if this.mapName ~= loadMapName then + this.mapName = loadMapName + if this.mapGameObject ~= nil then + GameObject.Destroy(this.mapGameObject) + end + this.mapGameObject = BattleManager.CreateMap(this.battleSceneGameObject, loadMapName) + fightOnHook:UpdateMap(this.mapGameObject) + end if not hasLoad then timePressStarted = Time.realtimeSinceStartup isAnimActive = false @@ -572,15 +581,7 @@ function FightPointPassMainPanel:OnShow() callBack = nil end end - local loadMapName = fightLevelConfig[FightPointPassManager.curOpenFight].BG - if this.mapName ~= loadMapName then - this.mapName = loadMapName - if this.mapGameObject ~= nil then - GameObject.Destroy(this.mapGameObject) - end - this.mapGameObject = BattleManager.CreateMap(this.battleSceneGameObject, loadMapName) - fightOnHook:UpdateMap(this.mapGameObject) - end + this.BtnsIsOpen() --寻宝显示 this.UpdateFindTreasureMaterialNum() @@ -1022,7 +1023,7 @@ function FightPointPassMainPanel:OnDestroy() end this.mapGameObject = nil - + this.mapName = nil if this.battleSceneGameObject ~= nil then GameObject.Destroy(this.battleSceneGameObject) this.battleSceneGameObject = nil