[洞府摘星阁]=====显示修改

dev_chengFeng
wangzhenxing 2022-08-09 13:42:59 +08:00
parent 5ab37aa2a9
commit 958c4286d1
1 changed files with 19 additions and 5 deletions

View File

@ -144,16 +144,20 @@ function this:SetData()
this.costCondition.text = ""
this.costIcon.gameObject:SetActive(true)
this.costNum.gameObject:SetActive(true)
this.costIcon.sprite = this.spLoader:LoadSprite(GetSpriteNameByItemId(cost[1][1]))
local color2 = BagManager.GetTotalItemNum(cost[1][1]) >= cost[1][2] and "#FFEED6" or "red"
this.costNum.text = string.format("<color=%s>%s</color>",color2,cost[1][2])
if cost[2] then
LogError("cost len=="..#cost)
if #cost>1 then
this.costIcon2.gameObject:SetActive(true)
this.costNum2.gameObject:SetActive(true)
this.costIcon2.sprite = this.spLoader:LoadSprite(GetSpriteNameByItemId(cost[2][1]))
local color3 = BagManager.GetTotalItemNum(cost[2][1]) >= cost[2][2] and "#FFEED6" or "red"
this.costNum2.text = string.format("<color=%s>%s</color>",color3,cost[2][2])
else
this.costIcon2.gameObject:SetActive(false)
this.costNum2.gameObject:SetActive(false)
end
else
this.costIcon.gameObject:SetActive(false)
@ -162,7 +166,6 @@ function this:SetData()
this.costNum2.gameObject:SetActive(false)
this.costCondition.text = string.format("<color=red>%s需要到达%s级</color>",HomeLand[limit[1]].Name,limit[2])
end
--按钮和tips显示
local bool = HomeLandManager.GetCurIndexBtnsShow()
local bool2 =
@ -182,8 +185,19 @@ function this:SetData()
this.costCondition.gameObject:SetActive(false)
--突破的消耗和升级不同
local cost = EquipRankUp[HomeLandManager.levelProId].Cost
local color2 = BagManager.GetTotalItemNum(cost[1]) >= cost[2] and "#FFEED6" or "red"
this.costNum.text = string.format("<color=%s>%s</color>",color2,cost[2])
local color2 = BagManager.GetTotalItemNum(cost[1][1]) >= cost[1][2] and "#FFEED6" or "red"
this.costIcon.sprite = this.spLoader:LoadSprite(GetSpriteNameByItemId(cost[1][1]))
this.costNum.text = string.format("<color=%s>%s</color>",color2,cost[1][2])
if cost[2] then
this.costIcon2.gameObject:SetActive(true)
this.costNum2.gameObject:SetActive(true)
this.costIcon2.sprite = this.spLoader:LoadSprite(GetSpriteNameByItemId(cost[2][1]))
local color3 = BagManager.GetTotalItemNum(cost[2][1]) >= cost[2][2] and "#FFEED6" or "red"
this.costNum2.text = string.format("<color=%s>%s</color>",color3,cost[2][2])
else
this.costIcon2.gameObject:SetActive(false)
this.costNum2.gameObject:SetActive(false)
end
end
else
this.Btn1:SetActive(true)