DESKTOP-MMO982B\User 2024-10-17 19:57:06 +08:00
parent 9dd81f082d
commit 645fa025a8
1 changed files with 12 additions and 11 deletions

View File

@ -547,7 +547,16 @@ function FightPointPassMainPanel:OnShow()
-- 刷新关卡按钮状态 -- 刷新关卡按钮状态
this.SetFightBtnText() 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 if not hasLoad then
timePressStarted = Time.realtimeSinceStartup timePressStarted = Time.realtimeSinceStartup
isAnimActive = false isAnimActive = false
@ -572,15 +581,7 @@ function FightPointPassMainPanel:OnShow()
callBack = nil callBack = nil
end end
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.BtnsIsOpen()
--寻宝显示 --寻宝显示
this.UpdateFindTreasureMaterialNum() this.UpdateFindTreasureMaterialNum()
@ -1022,7 +1023,7 @@ function FightPointPassMainPanel:OnDestroy()
end end
this.mapGameObject = nil this.mapGameObject = nil
this.mapName = nil
if this.battleSceneGameObject ~= nil then if this.battleSceneGameObject ~= nil then
GameObject.Destroy(this.battleSceneGameObject) GameObject.Destroy(this.battleSceneGameObject)
this.battleSceneGameObject = nil this.battleSceneGameObject = nil