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