This commit is contained in:
xiekaidong 2023-08-15 19:41:17 +08:00
parent 5d910f5ebc
commit 4ffcda7f0e

View File

@ -10,6 +10,7 @@ function ActivityHeroComp:init()
self.txTime = uiMap["hero_panel.tx_time"]
self.btnBuy = uiMap["hero_panel.btn_buy"]
self.txBuy = uiMap["hero_panel.btn_buy.tx_buy"]
self.rewardNode = uiMap["hero_panel.rewards"]
self.rewardCells = {}
for i = 1, 3 do
table.insert(self.rewardCells, uiMap["hero_panel.rewards.pop_reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.POP_REWARD_CELL))
@ -36,6 +37,7 @@ function ActivityHeroComp:refresh()
cell:setVisible(false)
end
end
self.rewardNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout()
if DataManager.ShopData:getGiftRemainBuyNum(GConst.ActivityConst.HERO_GIFT_ID_1) > 0 then
self.btnBuy:setTouchEnable(true)
self.btnBuy:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_2")