抽卡部分
This commit is contained in:
parent
58f261aeef
commit
4e5316033a
@ -35,6 +35,7 @@ function BoxRewardUI:onLoadRootComplete()
|
|||||||
self.uiMap = self.root:genAllChildren()
|
self.uiMap = self.root:genAllChildren()
|
||||||
|
|
||||||
self.titleTx = self.uiMap["box_reward_ui.title.text"]
|
self.titleTx = self.uiMap["box_reward_ui.title.text"]
|
||||||
|
self.titleTx:setText("恭喜获得TD") -- TODOJ
|
||||||
|
|
||||||
self.scrollRectObj = self.uiMap["box_reward_ui.scroll_rect"]
|
self.scrollRectObj = self.uiMap["box_reward_ui.scroll_rect"]
|
||||||
self.scrollRect = self.scrollRectObj:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
|
self.scrollRect = self.scrollRectObj:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
|
||||||
|
|||||||
@ -71,10 +71,11 @@ function SummonData:getSummonRewardByLv(summonType, level)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SummonData:getSummonTotalRewardByLv(summonType, level)
|
function SummonData:getSummonTotalRewardByLv(summonType, level)
|
||||||
|
|
||||||
level = level or self:getSummonLevel()
|
level = level or self:getSummonLevel()
|
||||||
local rewards = {}
|
local rewards = {}
|
||||||
for i = 1, level do
|
for lv = 1, level do
|
||||||
local lvRewards = self:getSummonRewardByLv(summonType)
|
local lvRewards = self:getSummonRewardByLv(summonType, lv)
|
||||||
for _, reward in ipairs(lvRewards) do
|
for _, reward in ipairs(lvRewards) do
|
||||||
table.insert(rewards, reward)
|
table.insert(rewards, reward)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user