【四象心法】点击消耗道具显示详情

dev_chengFeng
yuanshuai 2021-09-22 20:08:27 +08:00
parent 4910773749
commit d8e88d4fba
1 changed files with 7 additions and 0 deletions

View File

@ -335,6 +335,13 @@ function this.UpdateBtnStateAndCostShow()
if cueHasNum<costStr[2] then
num.text = string.format("<color=red>%s/%s</color>",PrintWanNum2(cueHasNum),costStr[2])
end
local itemBtn=Util.GetGameObject(costObj,"Image")
local itemId=costStr[1]
Util.AddOnceClick(itemBtn, function()
LogRed("itemid:"..itemId)
this.itemView:OnBtnCkickEvent(itemId)
end)
else
costObj:SetActive(false);
end