【(送神祠)选择属性筛选后进行恭送神将、神将归元、法宝归元、宝物分解优化】

dev_chengFeng
DESKTOP-98AVA47\Administrator 2021-01-05 14:29:33 +08:00
parent c96aedc923
commit 238c0706c0
6 changed files with 29 additions and 8 deletions

View File

@ -27,6 +27,8 @@ this.MapView = 0
this.IsGetFiveStarHero = false this.IsGetFiveStarHero = false
this.headBookListTag = 1 this.headBookListTag = 1
this.now_index = 0
local update = function() local update = function()
local dt = Time.unscaledDeltaTime local dt = Time.unscaledDeltaTime
this.serverTime = this.serverTime + dt this.serverTime = this.serverTime + dt

View File

@ -55,7 +55,7 @@ function ResolvePanel:InitComponent()
this.selectHeroBtn = Util.GetGameObject(this.panel, "endTabs/selectBtn") this.selectHeroBtn = Util.GetGameObject(this.panel, "endTabs/selectBtn")
for i = 1, 6 do for i = 1, 5 do
heroEndBtns[i]=Util.GetGameObject(this.panel, "endTabs/btnHeroGrid/btnHeroGrid/Btn"..i-1) heroEndBtns[i]=Util.GetGameObject(this.panel, "endTabs/btnHeroGrid/btnHeroGrid/Btn"..i-1)
end end
for i = 1, #this.contents do for i = 1, #this.contents do
@ -85,6 +85,7 @@ function ResolvePanel:BindEvent()
for i = 1, 6 do for i = 1, 6 do
Util.AddClick( heroEndBtns[i], function() Util.AddClick( heroEndBtns[i], function()
print("来之前"..tabSortType)
if tabSortType == i-1 then if tabSortType == i-1 then
tabSortType = 0 tabSortType = 0
this.contents[curIndex].view.SortTypeClick(0)--全部 this.contents[curIndex].view.SortTypeClick(0)--全部
@ -94,7 +95,8 @@ function ResolvePanel:BindEvent()
this.contents[curIndex].view.SortTypeClick(i-1) this.contents[curIndex].view.SortTypeClick(i-1)
this.EndTabBtnSelect(heroEndBtns[i]) this.EndTabBtnSelect(heroEndBtns[i])
end end
PlayerManager.now_index = tabSortType
print("来之后"..tabSortType)
end) end)
end end
end end
@ -140,6 +142,9 @@ function ResolvePanel:OnClose()
for i = 1, #this.contents do for i = 1, #this.contents do
this.contents[i].view:OnClose() this.contents[i].view:OnClose()
end end
this.RewardGridGoMov(false)
PlayerManager.now_index = 0
this.EndTabBtnSelect()
end end
function ResolvePanel:OnDestroy() function ResolvePanel:OnDestroy()
@ -151,10 +156,16 @@ end
--切换视图 --切换视图
function this.SwitchView(index) function this.SwitchView(index)
this.RewardGridGoMov(false)
--先执行上一面板关闭逻辑 --先执行上一面板关闭逻辑
local oldSelect local oldSelect
oldSelect, curIndex = curIndex, index oldSelect, curIndex = curIndex, index
if oldSelect ~= curIndex then
-- body
this.RewardGridGoMov(false)
PlayerManager.now_index = 0
end
for i = 1, #this.contents do for i = 1, #this.contents do
if oldSelect~=0 then this.contents[oldSelect].view:OnClose() break end if oldSelect~=0 then this.contents[oldSelect].view:OnClose() break end
end end
@ -189,10 +200,11 @@ function this.SwitchView(index)
this.title:SetNativeSize() this.title:SetNativeSize()
--执行子模块初始化 --执行子模块初始化
this.contents[index].view:OnShow(this.sortingOrder,this.itemListRoot) this.contents[index].view:OnShow(this.sortingOrder,this.itemListRoot)
--刷新选择按钮 --刷新选择按钮
tabSortType = 0 tabSortType = 0
this.EndTabBtnSelect() this.EndTabBtnSelect(heroEndBtns[PlayerManager.now_index + 1])
end end
-- tab节点显示自定义 -- tab节点显示自定义

View File

@ -36,6 +36,7 @@ function this:BindEvent()
if tonumber(LengthOfTable(selectHeroData))==0 then if tonumber(LengthOfTable(selectHeroData))==0 then
PopupTipPanel.ShowTip(Language[11787]) PopupTipPanel.ShowTip(Language[11787])
else else
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.ResolveDismantle, UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.ResolveDismantle,
HeroManager.GetHeroReturnItems(selectHeroData,GENERAL_POPUP_TYPE.ResolveDismantle),selectHeroData) HeroManager.GetHeroReturnItems(selectHeroData,GENERAL_POPUP_TYPE.ResolveDismantle),selectHeroData)
end end
@ -67,8 +68,9 @@ function this:RemoveListener()
end end
function this:OnShow(...) function this:OnShow(...)
sortingOrder =0 sortingOrder = PlayerManager.now_index or 0
this.SortTypeClick(sortingOrder) this.SortTypeClick(sortingOrder)
end end
--展示数据 --展示数据

View File

@ -63,6 +63,9 @@ end
function this:OnShow(...) function this:OnShow(...)
sortingOrder =0 sortingOrder =0
sortingOrder = PlayerManager.now_index or 0
LogGreen(PlayerManager.now_index)
this.SortTypeClick(sortingOrder) this.SortTypeClick(sortingOrder)
end end

View File

@ -55,9 +55,9 @@ end
function this:OnShow(...) function this:OnShow(...)
local args={...} local args={...}
sortingOrder =args[1] sortingOrder =args[1]
sortType =0 sortType = PlayerManager.now_index or 0
LogGreen(PlayerManager.now_index)
this.SortTypeClick(sortType) this.SortTypeClick(sortType)
end end

View File

@ -52,8 +52,10 @@ end
function this:OnShow(...) function this:OnShow(...)
local args={...} local args={...}
sortingOrder =args[1] sortingOrder =args[1]
sortType =0
sortType = PlayerManager.now_index or 0
LogGreen(PlayerManager.now_index)
this.SortTypeClick(sortType) this.SortTypeClick(sortType)
end end