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()
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