变身卡升级升星去除 消耗妖精显示

dev_fengTi_And
wangzhenxing 2023-07-20 18:39:01 +08:00
parent 06022bf0ae
commit a2d3393829
1 changed files with 4 additions and 2 deletions

View File

@ -38,6 +38,8 @@ function this:InitComponent()
this.costGrid = Util.GetGameObject(this.costLayout, "costGrid")
this.costImg = Util.GetGameObject(this.costLayout, "costItem/Image"):GetComponent("Image")
this.costTxt = Util.GetGameObject(this.costLayout, "costItem/Text"):GetComponent("Text")
this.costImg.gameObject:SetActive(false)
this.costTxt.gameObject:SetActive(false)
this.costItem=Util.GetGameObject(this.costLayout, "costGrid/costItem")
this.frame=Util.GetGameObject(this.costItem, "frame"):GetComponent("Image")
this.iconDefault=Util.GetGameObject(this.costItem, "iconDefault")
@ -211,8 +213,8 @@ function this.UpdateWin()
this.upStarText.text="升 星"
if starConfig.PropList[2] then
this.costImg.gameObject:SetActive(true)
this.costTxt.gameObject:SetActive(true)
this.costImg.gameObject:SetActive(false)
this.costTxt.gameObject:SetActive(false)
local costItemConfig=ConfigManager.GetConfigData(ConfigName.ItemConfig,starConfig.PropList[2][1])
local haveItemNum=BagManager.GetItemCountById(costItemConfig.Id)
if haveItemNum<starConfig.PropList[2][2] then