【优化】设置物品显示的方法改为通用方法
parent
62097d4d05
commit
bb685191dd
|
@ -114,7 +114,7 @@ function this:FormationAdapter()
|
|||
this.LiveGO = poolManager:LoadLive(this.LiveName, this.live2dRoot.transform,
|
||||
Vector3.one * heroConfig.Scale, Vector3.New(heroConfig.Position[1],heroConfig.Position[2],0))
|
||||
end
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,5,1,sortingOrder,false,rewardData)
|
||||
ResetItemView(this.root,this.root.transform,itemList,5,1,sortingOrder,false,rewardData)
|
||||
end
|
||||
function this:OnClose()
|
||||
if fun then
|
||||
|
|
|
@ -122,7 +122,7 @@ function this:FormationAdapter()
|
|||
end
|
||||
end
|
||||
end
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,5,1,sortingOrder,false,rewardData)
|
||||
ResetItemView(this.root,this.root.transform,itemList,5,1,sortingOrder,false,rewardData)
|
||||
end
|
||||
|
||||
function this.OnSortingOrderChange()
|
||||
|
|
|
@ -183,7 +183,7 @@ function this:FormationAdapter()
|
|||
heroListGo[i]:SetActive(false)
|
||||
end
|
||||
end
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,5,1,sortingOrder,false,rewardData)
|
||||
ResetItemView(this.root,this.root.transform,itemList,5,1,sortingOrder,false,rewardData)
|
||||
end
|
||||
|
||||
function this.OnSortingOrderChange()
|
||||
|
|
|
@ -194,7 +194,7 @@ function this:FormationAdapter()
|
|||
heroListGo[i]:SetActive(false)
|
||||
end
|
||||
end
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,5,1,sortingOrder,false,rewardData)
|
||||
ResetItemView(this.root,this.root.transform,itemList,5,1,sortingOrder,false,rewardData)
|
||||
end
|
||||
|
||||
function this.OnSortingOrderChange()
|
||||
|
|
|
@ -251,7 +251,7 @@ function this.FindFairyRecordShow(root, data)
|
|||
local logoName = GuildManager.GetLogoResName(data.icon)
|
||||
guildIcon.sprite = this.spLoader:LoadSprite(logoName)
|
||||
end
|
||||
FindFairyManager.ResetItemView(
|
||||
ResetItemView(
|
||||
root,
|
||||
heroHead.transform,
|
||||
this.heroItemList,
|
||||
|
@ -274,7 +274,7 @@ function this.ScoreRewardShow(root, data)
|
|||
local stateText = Util.GetGameObject(root, "StateBtn/Text"):GetComponent("Text")
|
||||
local config = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig, data.missionId)
|
||||
info.text = Language[10634] .. config.Values[1][1] .. Language[10635]
|
||||
FindFairyManager.ResetItemView(root, rewardRoot, this.scoreItemList, 4, 1, this.sortingOrder, false, config.Reward)
|
||||
ResetItemView(root, rewardRoot, this.scoreItemList, 4, 1, this.sortingOrder, false, config.Reward)
|
||||
|
||||
stateBtn:GetComponent("Button").interactable = data.value >= config.Values[1][1] and data.state == 0
|
||||
|
||||
|
@ -358,7 +358,7 @@ function this.BigRankRewardShow(root, data, index)
|
|||
end
|
||||
--奖励物品根节点
|
||||
local rewardRoot = Util.GetGameObject(root, "RewardRoot").transform
|
||||
FindFairyManager.ResetItemView(
|
||||
ResetItemView(
|
||||
root,
|
||||
rewardRoot,
|
||||
this.bigItemList,
|
||||
|
|
|
@ -77,7 +77,7 @@ function this.SetShow(root,data)
|
|||
local progress=Util.GetGameObject(root,"Progress"):GetComponent("Text")
|
||||
|
||||
title.text=GetLanguageStrById(data.native.Name)
|
||||
FindFairyManager.ResetItemView(root,content.transform,itemList,4,0.9,sortingOrder,false,data.native.RewardShow)
|
||||
ResetItemView(root,content.transform,itemList,4,0.9,sortingOrder,false,data.native.RewardShow)
|
||||
|
||||
stateBtn:GetComponent("Button").interactable=data.server.buyTimes< data.native.Limit
|
||||
if data.server.buyTimes< data.native.Limit then--未购买
|
||||
|
|
|
@ -79,7 +79,7 @@ function this:SetShow(root,data)
|
|||
local config = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,data.missionId)
|
||||
|
||||
title.text= GetLanguageStrById(config.ContentsShow)
|
||||
FindFairyManager.ResetItemView(root,content.transform,itemList,4,0.9,sortingOrder,false,config.Reward)
|
||||
ResetItemView(root,content.transform,itemList,4,0.9,sortingOrder,false,config.Reward)
|
||||
|
||||
progress.text="("..data.value.."/"..config.Values[1][1]..")"
|
||||
progress.enabled= data.value<config.Values[1][1]
|
||||
|
|
|
@ -356,11 +356,11 @@ function this.SetCurRankReward(myRankData)
|
|||
for i = 1, #FindFairyManager.rankRewardData do
|
||||
--前3档奖励
|
||||
if myRank<=3 and i==myRank then
|
||||
FindFairyManager.ResetItemView(this.bottomView,this.curRewardRoot.transform,
|
||||
ResetItemView(this.bottomView,this.curRewardRoot.transform,
|
||||
this.curRewardItemList,3,0.9,sortingOrder,false,FindFairyManager.rankRewardData[i].RankingReward)
|
||||
--后续各档位奖励
|
||||
elseif myRank>3 and myRank>=FindFairyManager.rankRewardData[i].MinRank and myRank<=FindFairyManager.rankRewardData[i].MaxRank then
|
||||
FindFairyManager.ResetItemView(this.bottomView,this.curRewardRoot.transform,
|
||||
ResetItemView(this.bottomView,this.curRewardRoot.transform,
|
||||
this.curRewardItemList,3,0.9,sortingOrder,false,FindFairyManager.rankRewardData[i].RankingReward)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -166,7 +166,7 @@ function this.SetInfo(id)
|
|||
this.countText.text=redpack.Num
|
||||
this.message.text=GetLanguageStrById(redpack.SendWord)
|
||||
|
||||
FindFairyManager.ResetItemView(this.rewardRoot,this.rewardRoot.transform,this.itemList,4,0.9,sortingOrder,false,recharge.BaseReward)
|
||||
ResetItemView(this.rewardRoot,this.rewardRoot.transform,this.itemList,4,0.9,sortingOrder,false,recharge.BaseReward)
|
||||
|
||||
this.sendBtn:GetComponent("Button").interactable=surplusNum>0
|
||||
Util.SetGray(this.sendBtn,surplusNum<1)
|
||||
|
|
|
@ -78,7 +78,7 @@ function this:OnShow(_parent,...)
|
|||
index = index + 1
|
||||
end
|
||||
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,4,1,sortingOrder,false,data)
|
||||
ResetItemView(this.root,this.root.transform,itemList,4,1,sortingOrder,false,data)
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
|
@ -55,7 +55,7 @@ function this:OnShow(_parent,...)
|
|||
this.titleText.text=Language[11541]
|
||||
this.numImage.sprite = SetIcon(this.spLoader, 14)
|
||||
this.numImage2.sprite = SetIcon(this.spLoader, 1258)
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,args[3])
|
||||
ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,args[3])
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
|
@ -31,7 +31,7 @@ function this:OnShow(_parent,...)
|
|||
sortingOrder = _parent.sortingOrder
|
||||
--不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
|
||||
local args = {...}
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,10,1.2,sortingOrder,false,ConfigManager.GetConfigData(ConfigName.GuildHelpConfig,1).Reward)
|
||||
ResetItemView(this.root,this.root.transform,itemList,10,1.2,sortingOrder,false,ConfigManager.GetConfigData(ConfigName.GuildHelpConfig,1).Reward)
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
|
@ -92,7 +92,7 @@ function this:OnShow(_parent,...)
|
|||
for i=1,#dropList do
|
||||
_data[i]={dropList[i].id,dropList[i].num}
|
||||
end
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,8,1,sortingOrder,false,_data)
|
||||
ResetItemView(this.root,this.root.transform,itemList,8,1,sortingOrder,false,_data)
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
|
@ -71,7 +71,7 @@ function this:OnShow(_parent,...)
|
|||
else
|
||||
this.infoTxt.text=string.format(Language[12214],coin,GetLanguageStrById(itemConfig[id].Name),GetLanguageStrById(lingshouConfig.Name),"%")
|
||||
end
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,args[2])
|
||||
ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,args[2])
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
|
@ -51,7 +51,7 @@ function this:OnShow(_parent,...)
|
|||
--this.num.text = args[1]
|
||||
fun = args[2]
|
||||
this.infoTxt.text=Language[11576]
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,args[1])
|
||||
ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,args[1])
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
|
@ -75,7 +75,7 @@ function this:OnShow(_parent,...)
|
|||
for i, v in pairs(dropList) do
|
||||
data[i]={v.id,v.num}
|
||||
end
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,data)
|
||||
ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,data)
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
|
@ -98,7 +98,7 @@ function this:OnShow(_parent,...)
|
|||
index = index + 1
|
||||
end
|
||||
LogBlue(#data)
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,60,1,sortingOrder,false,data)
|
||||
ResetItemView(this.root,this.root.transform,itemList,60,1,sortingOrder,false,data)
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
|
@ -101,7 +101,7 @@ function this:OnShow(_parent,...)
|
|||
return itemConfig[a[1]].ItemType > itemConfig[b[1]].ItemType
|
||||
end
|
||||
end)
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,8,1,sortingOrder,false,_data)
|
||||
ResetItemView(this.root,this.root.transform,itemList,8,1,sortingOrder,false,_data)
|
||||
|
||||
|
||||
--英雄消耗道具数量
|
||||
|
|
|
@ -83,7 +83,7 @@ function this:OnShow(_parent,...)
|
|||
for i=1,#dropList do
|
||||
_data[i] = {dropList[i].id,dropList[i].num,nil,dropList[i].star}
|
||||
end
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,8,1,sortingOrder,false,_data)
|
||||
ResetItemView(this.root,this.root.transform,itemList,8,1,sortingOrder,false,_data)
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
|
@ -51,7 +51,7 @@ function this:OnShow(_parent,...)
|
|||
fun = _args[3]
|
||||
this.titleText.text=Language[11541]
|
||||
this.numImage.sprite = SetIcon(this.spLoader, 14)
|
||||
FindFairyManager.ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,_args[2])
|
||||
ResetItemView(this.root,this.root.transform,itemList,10,1,sortingOrder,false,_args[2])
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
|
@ -103,7 +103,7 @@ function QiJieShiLianMonsterInfo:FormationAdapter()
|
|||
heroListGo[i]:SetActive(false)
|
||||
end
|
||||
end
|
||||
FindFairyManager.ResetItemView(self.root,self.root.transform,itemList,5,1,sortingOrder,false,rewardData)
|
||||
ResetItemView(self.root,self.root.transform,itemList,5,1,sortingOrder,false,rewardData)
|
||||
end
|
||||
|
||||
function QiJieShiLianMonsterInfo:OnSortingOrderChange()
|
||||
|
|
Loading…
Reference in New Issue