逍遥游提交
parent
e76b41d784
commit
c8a9f3f8db
|
|
@ -75,10 +75,11 @@ function this.InitLuckyTurnTables(msg)
|
|||
end
|
||||
this.luckyluckyTurnTableTimes = msg.randomNum
|
||||
if msg.randomTime and msg.randomTime > 0 then
|
||||
this.luckyluckyTurnTableRemainTime = msg.randomTime
|
||||
this.luckyluckyTurnTableTimes = msg.randomTime
|
||||
elseif msg.overTime and msg.overTime > 0 then
|
||||
this.luckyluckyTurnTableRemainTime = msg.overTime
|
||||
end
|
||||
LogGreen("幸运转盘剩余次数:"..this.luckyluckyTurnTableTimes)
|
||||
end
|
||||
|
||||
-- type 1初始化 2添加 hero
|
||||
|
|
@ -102,6 +103,7 @@ function this.InitHeroData(goodsInfo,type)
|
|||
table.sort(this.HeroData,function(a,b)
|
||||
return a.goodsIndex > b.goodsIndex
|
||||
end)
|
||||
LogGreen("招募英雄个数"..#this.HeroData)
|
||||
end
|
||||
|
||||
function this.GetHeroDatas()
|
||||
|
|
@ -148,6 +150,7 @@ function this.InitMonsterData(BackMonsterDatas,type)
|
|||
monster.reward = BackMonsterDatas.rewardShow
|
||||
table.insert(this.MonsterData,monster)
|
||||
end
|
||||
LogGreen("boss个数"..#this.MonsterData)
|
||||
end
|
||||
|
||||
--刷新
|
||||
|
|
|
|||
|
|
@ -41,21 +41,22 @@ function this:BindEvent()
|
|||
end)
|
||||
--商店点击
|
||||
Util.AddClick(this.shopBtn, function ()
|
||||
|
||||
UIManager.OpenPanel(UIName.XiaoyaoHeroGetPopup)
|
||||
end)
|
||||
--转盘点击
|
||||
Util.AddClick(this.rouleBtn, function ()
|
||||
local grids={{index=3,gName="ccc"},{index=5,gName="eee"},{index=2,gName="bbb"},{index=4,gName="ddd"}}
|
||||
table.sort(grids,function(a,b)
|
||||
return a.index < b.index
|
||||
end)
|
||||
for i = 1, #grids do
|
||||
Log(grids[i].gName)
|
||||
end
|
||||
-- local grids={{index=3,gName="ccc"},{index=5,gName="eee"},{index=2,gName="bbb"},{index=4,gName="ddd"}}
|
||||
-- table.sort(grids,function(a,b)
|
||||
-- return a.index < b.index
|
||||
-- end)
|
||||
-- for i = 1, #grids do
|
||||
-- Log(grids[i].gName)
|
||||
-- end
|
||||
UIManager.OpenPanel(UIName.XiaoYaoLuckyTurnTablePopup)
|
||||
end)
|
||||
--boss点击事件
|
||||
Util.AddClick(this.bossBtn, function ()
|
||||
|
||||
UIManager.OpenPanel(UIName.XiaoYaoLuckyBossPopup)
|
||||
end)
|
||||
--奖励预览
|
||||
Util.AddClick(this.previewBtn, function ()
|
||||
|
|
@ -147,11 +148,25 @@ function this.EventTrigger(_data)
|
|||
elseif _data.pathType==3 then --额外骰子节点
|
||||
PopupTipPanel.ShowTip("骰子x2")
|
||||
elseif _data.pathType==4 then --招募英雄节点
|
||||
this.shopBtn:SetActive(true)
|
||||
local temp = XiaoYaoManager.GetHeroDatas()()
|
||||
if temp and #temp > 0 then
|
||||
this.shopBtn:SetActive(true)
|
||||
else
|
||||
this.shopBtn:SetActive(false)
|
||||
end
|
||||
elseif _data.pathType==5 then --怪物节点
|
||||
this.bossBtn:SetActive(true)
|
||||
local temp = XiaoYaoManager.GetMonsterDatas()
|
||||
if temp and #temp > 0 then
|
||||
this.bossBtn:SetActive(true)
|
||||
else
|
||||
this.bossBtn:SetActive(false)
|
||||
end
|
||||
elseif _data.pathType==6 then --转盘
|
||||
this.rouleBtn:SetActive(true)
|
||||
if XiaoYaoManager.luckyluckyTurnTableRemainTime - PlayerManager.serverTime() > 0 then
|
||||
this.rouleBtn:SetActive(true)
|
||||
else
|
||||
this.rouleBtn:SetActive(false)
|
||||
end
|
||||
end
|
||||
if _data.drop.itemlist ~= nil and #_data.drop.itemlist > 0 then
|
||||
local content = {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue