图鉴bug修改
parent
0a824f56ee
commit
562e482740
|
@ -40,6 +40,14 @@ function HandBookHeroAndEquipListPanel:InitComponent()
|
|||
self.twoGrid = Util.GetGameObject(self.heroScroll.transform, "grid/twoGrid")
|
||||
self.oneGrid = Util.GetGameObject(self.heroScroll.transform, "grid/oneGrid")
|
||||
|
||||
self.tenStar = Util.GetGameObject(self.heroScroll.transform, "grid/tenStarNum")
|
||||
self.sexStar = Util.GetGameObject(self.heroScroll.transform, "grid/sexStarNum")
|
||||
self.fiveStar = Util.GetGameObject(self.heroScroll.transform, "grid/fiveStarNum")
|
||||
self.fourStar = Util.GetGameObject(self.heroScroll.transform, "grid/fourStarNum")
|
||||
self.threeStar = Util.GetGameObject(self.heroScroll.transform, "grid/threeStarNum")
|
||||
self.twoStar = Util.GetGameObject(self.heroScroll.transform, "grid/twoStarNum")
|
||||
self.oneStar = Util.GetGameObject(self.heroScroll.transform, "grid/oneStarNum")
|
||||
|
||||
self.tenStarNum = Util.GetGameObject(self.heroScroll.transform, "grid/tenStarNum/star/Text/Text (1)"):GetComponent("Text")
|
||||
self.sexStarNum = Util.GetGameObject(self.heroScroll.transform, "grid/sexStarNum/star/Text/Text (1)"):GetComponent("Text")
|
||||
self.fiveStarNum = Util.GetGameObject(self.heroScroll.transform, "grid/fiveStarNum/star/Text/Text (1)"):GetComponent("Text")
|
||||
|
@ -279,19 +287,26 @@ function HandBookHeroAndEquipListPanel:OnShowHeroFun()
|
|||
|
||||
|
||||
self.tenStarNum.text = Language[11096]..curtenStarActiveNum.."/"..#tenHeroList
|
||||
self.tenStarNum.gameObject:SetActive(#tenHeroList>0)
|
||||
self.tenStar.gameObject:SetActive(#tenHeroList>0)
|
||||
self.tenGrid.gameObject:SetActive(#tenHeroList>0)
|
||||
self.sexStarNum.text = Language[11096]..cursexStarActiveNum.."/"..#sexHeroList
|
||||
self.sexStarNum.gameObject:SetActive(#sexHeroList>0)
|
||||
self.sexStar.gameObject:SetActive(#sexHeroList>0)
|
||||
self.sexGrid.gameObject:SetActive(#tenHeroList>0)
|
||||
self.fiveStarNum.text = Language[11096]..curfiveStarActiveNum.."/"..#fiveHeroList
|
||||
self.fiveStarNum.gameObject:SetActive(#fiveHeroList>0)
|
||||
self.fiveStar.gameObject:SetActive(#fiveHeroList>0)
|
||||
self.fiveGrid.gameObject:SetActive(#fiveHeroList>0)
|
||||
self.fourStarNum.text = Language[11096]..curfourStarActiveNum.."/"..#fourHeroList
|
||||
self.fourStarNum.gameObject:SetActive(#fourHeroList>0)
|
||||
self.fourStar.gameObject:SetActive(#fourHeroList>0)
|
||||
self.fourGrid.gameObject:SetActive(#fourHeroList>0)
|
||||
self.threeStarNum.text = Language[11096]..curthreeStarActiveNum.."/"..#threeHeroList
|
||||
self.threeStarNum.gameObject:SetActive(#threeHeroList>0)
|
||||
self.threeStar.gameObject:SetActive(#threeHeroList>0)
|
||||
self.threeGrid.gameObject:SetActive(#threeHeroList>0)
|
||||
self.twoStarNum.text = Language[11096]..curtwoStarActiveNum.."/"..#twoHeroList
|
||||
self.twoStarNum.gameObject:SetActive(#twoHeroList>0)
|
||||
self.twoStar.gameObject:SetActive(#twoHeroList>0)
|
||||
self.twoGrid.gameObject:SetActive(#twoHeroList>0)
|
||||
self.oneStarNum.text = Language[11096]..curoneStarActiveNum.."/"..#oneHeroList
|
||||
self.oneStarNum.gameObject:SetActive(#oneHeroList>0)
|
||||
self.oneStar.gameObject:SetActive(#oneHeroList>0)
|
||||
self.oneGrid.gameObject:SetActive(#oneHeroList>0)
|
||||
|
||||
--十星的
|
||||
for i = 1, math.max(#tenHeroList, #tenGridList) do
|
||||
|
@ -301,12 +316,12 @@ function HandBookHeroAndEquipListPanel:OnShowHeroFun()
|
|||
tenGridList[i] = go
|
||||
end
|
||||
go.gameObject:SetActive(false)
|
||||
end
|
||||
end
|
||||
for i = 1, #tenHeroList do
|
||||
tenGridList[i]:SetActive(true)
|
||||
self:OnShowSingleHeroData(tenGridList[i],tenHeroList[i],10,255)
|
||||
end
|
||||
self.tenGrid.gameObject:SetActive(#oneHeroList>0)
|
||||
self.tenGrid.gameObject:SetActive(#tenHeroList>0)
|
||||
--六星的
|
||||
for i = 1, math.max(#sexHeroList, #sexGridList) do
|
||||
local go = sexGridList[i]
|
||||
|
@ -320,7 +335,7 @@ function HandBookHeroAndEquipListPanel:OnShowHeroFun()
|
|||
sexGridList[i]:SetActive(true)
|
||||
self:OnShowSingleHeroData(sexGridList[i],sexHeroList[i],6,145)
|
||||
end
|
||||
self.sexGrid.gameObject:SetActive(#oneHeroList>0)
|
||||
self.sexGrid.gameObject:SetActive(#sexGridList>0)
|
||||
--五星的
|
||||
for i = 1, math.max(#fiveHeroList, #fiveGridList) do
|
||||
local go = fiveGridList[i]
|
||||
|
@ -334,7 +349,7 @@ function HandBookHeroAndEquipListPanel:OnShowHeroFun()
|
|||
fiveGridList[i]:SetActive(true)
|
||||
self:OnShowSingleHeroData(fiveGridList[i],fiveHeroList[i])
|
||||
end
|
||||
self.fiveGrid.gameObject:SetActive(#oneHeroList>0)
|
||||
self.fiveGrid.gameObject:SetActive(#fiveGridList>0)
|
||||
--四星的
|
||||
for i = 1, math.max(#fourHeroList, #fourGridList) do
|
||||
local go = fourGridList[i]
|
||||
|
@ -348,7 +363,7 @@ function HandBookHeroAndEquipListPanel:OnShowHeroFun()
|
|||
fourGridList[i]:SetActive(true)
|
||||
self:OnShowSingleHeroData(fourGridList[i],fourHeroList[i])
|
||||
end
|
||||
self.fourGrid.gameObject:SetActive(#oneHeroList>0)
|
||||
self.fourGrid.gameObject:SetActive(#fourGridList>0)
|
||||
--三星的
|
||||
for i = 1, math.max(#threeHeroList, #threeGridList) do
|
||||
local go = threeGridList[i]
|
||||
|
@ -362,7 +377,7 @@ function HandBookHeroAndEquipListPanel:OnShowHeroFun()
|
|||
threeGridList[i]:SetActive(true)
|
||||
self:OnShowSingleHeroData(threeGridList[i],threeHeroList[i])
|
||||
end
|
||||
self.threeGrid.gameObject:SetActive(#oneHeroList>0)
|
||||
self.threeGrid.gameObject:SetActive(#threeGridList>0)
|
||||
--二星的
|
||||
for i = 1, math.max(#twoHeroList, #twoGridList) do
|
||||
local go = twoGridList[i]
|
||||
|
@ -378,7 +393,7 @@ function HandBookHeroAndEquipListPanel:OnShowHeroFun()
|
|||
end
|
||||
self.twoGrid.gameObject:SetActive(#oneHeroList>0)
|
||||
--一星的
|
||||
for i = 1, math.max(#oneHeroList, #oneGridList) do
|
||||
for i = 1, math.max(#oneHeroList, #twoGridList) do
|
||||
local go = oneGridList[i]
|
||||
if not go or (go and not go.gameObject) then
|
||||
go = self:GeneralNewGoPre(1,i,self.oneGrid)
|
||||
|
|
Loading…
Reference in New Issue