探索提交

dev_chengFeng
jiaoyangna 2021-12-24 09:37:31 +08:00
parent 6dfafd7054
commit 708a4bdef9
3 changed files with 23 additions and 7 deletions

View File

@ -40,7 +40,11 @@ function ExploreMainPanel:BindEvent()
UIManager.OpenPanel(UIName.GeneralInfoPopup,GENERALINFO_TYPE.ExploreMapTip,ExploreManager.GetExploreMapTipData(self.mapId))
end)
Util.AddClick(self.jinruBtn,function()
UIManager.OpenPanel(UIName.ExplorePanel,ExploreManager.ExploreMapData[self.mapId])
if LengthOfTable(self.data[self.mapId].formations) > 0 then
UIManager.OpenPanel(UIName.ExplorePanel,ExploreManager.ExploreMapData[self.mapId])
else
end
end)
Util.AddClick(self.tansuoBtn,function()
--选择队伍弹窗

View File

@ -10,7 +10,7 @@ function ExplorePanel:InitComponent()
self.backBtn = Util.GetGameObject(self.gameObject, "btns/backBtn")
self.lookReward = Util.GetGameObject(self.gameObject, "btns/lookReward")
fightMap:InitComponent(self.gameObject, this)
--fightMap:InitComponent(self.gameObject, this)
end
--绑定事件(用于子类重写
@ -25,12 +25,12 @@ end
--添加事件监听(用于子类重
function ExplorePanel:AddListener()
fightMap:AddListener()
--fightMap:AddListener()
end
--移除事件监听(用于子类重写)
function ExplorePanel:RemoveListener()
fightMap:RemoveListener()
--fightMap:RemoveListener()
end
--界面打开时调用(用于子类重写)
@ -40,15 +40,15 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function ExplorePanel:OnShow()
fightMap:Init()
--fightMap:Init()
end
--界面关闭时调用(用于子类重写)
function ExplorePanel:OnClose()
fightMap:OnClose()
--fightMap:OnClose()
end
function ExplorePanel:OnSortingOrderChange()
fightMap:OnSortingOrderChange(self.sortingOrder)
--fightMap:OnSortingOrderChange(self.sortingOrder)
end
--界面销毁时调用(用于子类重写)
function ExplorePanel:OnDestroy()

View File

@ -48,6 +48,18 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function ExploreRewardPopup:OnShow()
this.data = ExploreManager.GetFormationDataByMapId(this.mapId)
local ishave = false
for k,v in ipairs(this.data) do
if #v.dropReward > 0 then
ishave = true
break
end
end
if not ishave then
PopupTipPanel.ShowTip("尚未获得探索奖励!")
self:ClosePanel()
return
end
for i = 1,math.max(#this.data,#this.itemList) do
if not this.data[i] then
this.itemList[i].go.gameObject:SetActive(false)