助力礼包
This commit is contained in:
parent
5888ee766f
commit
08631456a2
@ -69,15 +69,17 @@ function LevelCell:refresh(idx, cfgInfo, clickCallback)
|
|||||||
-- 限时(隐藏)
|
-- 限时(隐藏)
|
||||||
self.timeImg:setVisible(false)
|
self.timeImg:setVisible(false)
|
||||||
|
|
||||||
if clickCallback then
|
|
||||||
self:addClickListener(function()
|
self:addClickListener(function()
|
||||||
clickCallback(cfgInfo.id)
|
self:onClickGift(cfgInfo.id)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
function LevelCell:setVisible(visible)
|
function LevelCell:setVisible(visible)
|
||||||
self.baseObject:setVisible(visible)
|
self.baseObject:setVisible(visible)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function LevelCell:onClickGift(id)
|
||||||
|
PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT)
|
||||||
|
end
|
||||||
|
|
||||||
return LevelCell
|
return LevelCell
|
||||||
@ -12,9 +12,7 @@ function LevelSellCell:init()
|
|||||||
end)
|
end)
|
||||||
self.scrollRect:addRefreshCallback(function(idx, cell)
|
self.scrollRect:addRefreshCallback(function(idx, cell)
|
||||||
if self.actGiftCfg and self.actGiftCfg[idx] then
|
if self.actGiftCfg and self.actGiftCfg[idx] then
|
||||||
cell:refresh(idx, self.actGiftCfg[idx], function()
|
cell:refresh(idx, self.actGiftCfg[idx])
|
||||||
self:onClickGift(self.actGiftCfg[idx].id)
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
self.scrollRect:clearCells()
|
self.scrollRect:clearCells()
|
||||||
@ -50,8 +48,4 @@ function LevelSellCell:setVisible(visible)
|
|||||||
self.baseObject:setVisible(visible)
|
self.baseObject:setVisible(visible)
|
||||||
end
|
end
|
||||||
|
|
||||||
function LevelSellCell:onClickGift(id)
|
|
||||||
Logger.logHighlight("Click id:%s", id) -- TODOJ
|
|
||||||
end
|
|
||||||
|
|
||||||
return LevelSellCell
|
return LevelSellCell
|
||||||
Loading…
x
Reference in New Issue
Block a user