Merge branch 'master_devlop_ys' of http://60.1.1.230/gaoxin/JL_Client into master_devlop_ys
# Conflicts: # Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoMapPanel.lua
commit
a7abe7aee5
|
|
@ -727,7 +727,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Padding:
|
m_Padding:
|
||||||
m_Left: 9
|
m_Left: 33
|
||||||
m_Right: 0
|
m_Right: 0
|
||||||
m_Top: 0
|
m_Top: 0
|
||||||
m_Bottom: 0
|
m_Bottom: 0
|
||||||
|
|
@ -2436,7 +2436,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 1.61, y: -380.1}
|
m_AnchoredPosition: {x: -14, y: -380.1}
|
||||||
m_SizeDelta: {x: 919.2, y: 188}
|
m_SizeDelta: {x: 919.2, y: 188}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &4199615056215748742
|
--- !u!222 &4199615056215748742
|
||||||
|
|
|
||||||
|
|
@ -1994,7 +1994,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: -7.6324615, y: 79}
|
m_AnchoredPosition: {x: -7.6324615, y: 93.9}
|
||||||
m_SizeDelta: {x: 0, y: 100}
|
m_SizeDelta: {x: 0, y: 100}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &6134426996411187629
|
--- !u!114 &6134426996411187629
|
||||||
|
|
|
||||||
|
|
@ -181,8 +181,8 @@ function XiaoYaoLuckyBossPopup:SetSelectHero(monsterData)
|
||||||
costId = cost[#cost][1]
|
costId = cost[#cost][1]
|
||||||
costNum = cost[#cost][2]
|
costNum = cost[#cost][2]
|
||||||
else
|
else
|
||||||
costId = cost[monsterData.attackNum][1]
|
costId = cost[monsterData.attackNum+1][1]
|
||||||
costNum = cost[monsterData.attackNum][2]
|
costNum = cost[monsterData.attackNum+1][2]
|
||||||
end
|
end
|
||||||
LogGreen("costId:"..costId.." costNum:"..costNum)
|
LogGreen("costId:"..costId.." costNum:"..costNum)
|
||||||
Util.GetGameObject(this.e_fightBtn,"Text").gameObject:SetActive(false)
|
Util.GetGameObject(this.e_fightBtn,"Text").gameObject:SetActive(false)
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,11 @@ function this.StartXiaoYao()
|
||||||
this.InitLuckyTurnTables(msg)
|
this.InitLuckyTurnTables(msg)
|
||||||
elseif msg.pathType == 4 then
|
elseif msg.pathType == 4 then
|
||||||
this.InitHeroData(msg.goodsInfo,2)
|
this.InitHeroData(msg.goodsInfo,2)
|
||||||
|
elseif msg.pathType == 0 then
|
||||||
|
LogRed("#msg.Drop:"..#msg.drop.itemlist)
|
||||||
|
LogRed("#msg.Drop1:"..#msg.drop.equipId )
|
||||||
|
LogRed("#msg.Drop2:"..#msg.drop.Hero )
|
||||||
|
LogRed("#msg.Drop3:"..#msg.drop.soulEquip )
|
||||||
end
|
end
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.XiaoYao.StartXiaoYao, msg)
|
Game.GlobalEvent:DispatchEvent(GameEvent.XiaoYao.StartXiaoYao, msg)
|
||||||
end)
|
end)
|
||||||
|
|
@ -70,18 +75,22 @@ function this.InitLuckyTurnTables(msg)
|
||||||
for i = 1, #msg.randomItem do
|
for i = 1, #msg.randomItem do
|
||||||
table.insert(this.luckyTurnTableRewards,msg.randomItem[i])
|
table.insert(this.luckyTurnTableRewards,msg.randomItem[i])
|
||||||
end
|
end
|
||||||
this.luckyluckyTurnTableTimes = msg.randomNum
|
|
||||||
this.luckyluckyTurnTableRemainTime = msg.randomTime
|
|
||||||
elseif msg.random and #msg.random > 0 then
|
elseif msg.random and #msg.random > 0 then
|
||||||
for i = 1, #msg.random do
|
for i = 1, #msg.random do
|
||||||
table.insert(this.luckyTurnTableRewards,msg.random[i])
|
table.insert(this.luckyTurnTableRewards,msg.random[i])
|
||||||
end
|
end
|
||||||
this.luckyluckyTurnTableTimes = this.luckyluckyTurnTableTimes + 1
|
|
||||||
this.luckyluckyTurnTableRemainTime = msg.overTime
|
|
||||||
elseif msg.nextRandom and #msg.nextRandom > 0 then
|
elseif msg.nextRandom and #msg.nextRandom > 0 then
|
||||||
for i = 1, #msg.nextRandom do
|
for i = 1, #msg.nextRandom do
|
||||||
table.insert(this.luckyTurnTableRewards,msg.nextRandom[i])
|
table.insert(this.luckyTurnTableRewards,msg.nextRandom[i])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
if msg.randomTime then
|
||||||
|
this.luckyluckyTurnTableTimes = msg.randomNum
|
||||||
|
this.luckyluckyTurnTableRemainTime = msg.randomTime
|
||||||
|
elseif msg.overTime then
|
||||||
|
this.luckyluckyTurnTableTimes = this.luckyluckyTurnTableTimes + 1
|
||||||
|
this.luckyluckyTurnTableRemainTime = msg.overTime
|
||||||
|
else
|
||||||
this.luckyluckyTurnTableTimes = this.luckyluckyTurnTableTimes - 1
|
this.luckyluckyTurnTableTimes = this.luckyluckyTurnTableTimes - 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -142,10 +151,20 @@ function this.InitHeroData(goodsInfo,type)
|
||||||
LogGreen("得到的招募数量:"..#this.HeroData)
|
LogGreen("得到的招募数量:"..#this.HeroData)
|
||||||
return this.HeroData
|
return this.HeroData
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--刷新
|
||||||
|
function this.UpdateHeroData(id)
|
||||||
|
for i,v in ipairs(this.HeroData) do
|
||||||
|
if v.goodsIndex == id then
|
||||||
|
table.remove(this.HeroData,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--获取招募时间
|
--获取招募时间
|
||||||
function this.GetHeroDataTime()
|
function this.GetHeroDataTime()
|
||||||
if not this.HeroData or #this.HeroData < 1 then
|
if not this.HeroData or #this.HeroData < 1 then
|
||||||
return nil
|
return 0
|
||||||
end
|
end
|
||||||
for i,v in ipairs(this.HeroData) do
|
for i,v in ipairs(this.HeroData) do
|
||||||
if v.remainTime - PlayerManager.serverTime < 1 then
|
if v.remainTime - PlayerManager.serverTime < 1 then
|
||||||
|
|
@ -159,7 +178,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)
|
||||||
return (this.HeroData[#this.HeroData].remainTime - PlayerManager.serverTime)
|
return (this.HeroData[#this.HeroData].remainTime)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- type 1初始化 2添加 boss
|
-- type 1初始化 2添加 boss
|
||||||
|
|
@ -249,7 +268,7 @@ end
|
||||||
--boss 剩余时间
|
--boss 剩余时间
|
||||||
function this.GetMonsterDataReMainTimesAndTime()
|
function this.GetMonsterDataReMainTimesAndTime()
|
||||||
if not this.MonsterData or #this.MonsterData < 1 then
|
if not this.MonsterData or #this.MonsterData < 1 then
|
||||||
return nil
|
return 0
|
||||||
end
|
end
|
||||||
local removeData = {}
|
local removeData = {}
|
||||||
for i,v in ipairs(this.MonsterData) do
|
for i,v in ipairs(this.MonsterData) do
|
||||||
|
|
@ -258,7 +277,10 @@ function this.GetMonsterDataReMainTimesAndTime()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
this.SortMonster(this.MonsterData)
|
this.SortMonster(this.MonsterData)
|
||||||
return (this.MonsterData[#this.MonsterData].remainTime - PlayerManager.serverTime)
|
for i,v in ipairs(this.MonsterData) do
|
||||||
|
LogGreen(v.monsterId.." v.remainTime:"..v.remainTime)
|
||||||
|
end
|
||||||
|
return (this.MonsterData[1].remainTime)
|
||||||
end
|
end
|
||||||
|
|
||||||
--开始战斗
|
--开始战斗
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ function this.EventTrigger(_data)
|
||||||
Log("触发事件类型为:".._data.pathType)
|
Log("触发事件类型为:".._data.pathType)
|
||||||
Log("触发事件时间为:".._data.overTime)
|
Log("触发事件时间为:".._data.overTime)
|
||||||
if _data.pathType==0 then --普通节点
|
if _data.pathType==0 then --普通节点
|
||||||
UIManager.OpenPanel(UIName.XiaoYaoEventPanel,0,_data.drop)
|
LogGreen("普通奖励:"..#_data.drop)
|
||||||
elseif _data.pathType==1 then --宝箱
|
elseif _data.pathType==1 then --宝箱
|
||||||
Log("获得一个宝箱!")
|
Log("获得一个宝箱!")
|
||||||
elseif _data.pathType==2 then --双倍节点
|
elseif _data.pathType==2 then --双倍节点
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,11 @@ function XiaoyaoHeroGetPopup:BindEvent()
|
||||||
PopupTipPanel.ShowTip(itemConfig[costId].Name.."不足")
|
PopupTipPanel.ShowTip(itemConfig[costId].Name.."不足")
|
||||||
else
|
else
|
||||||
NetManager.XiaoyaoyouGetHeroRequest(curHeroData.goodsIndex,function(msg)
|
NetManager.XiaoyaoyouGetHeroRequest(curHeroData.goodsIndex,function(msg)
|
||||||
|
if this.testLiveGO then
|
||||||
|
poolManager:UnLoadLive(this.testLiveGO.name, this.testLiveGO)
|
||||||
|
this.testLiveGO = nil
|
||||||
|
end
|
||||||
|
XiaoYaoManager.UpdateHeroData(curHeroData.goodsIndex)
|
||||||
XiaoYaoManager.GetHeroIndex = 0
|
XiaoYaoManager.GetHeroIndex = 0
|
||||||
this:OnShow()
|
this:OnShow()
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop)
|
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop)
|
||||||
|
|
@ -228,7 +233,7 @@ function this.ShowHeroBuyInfo(_heroSConfigData)
|
||||||
if BagManager.GetItemCountById(costId) < costNum then
|
if BagManager.GetItemCountById(costId) < costNum then
|
||||||
this.costNum.text = "<color=#FF0000>" .. costNum .. "</color>"
|
this.costNum.text = "<color=#FF0000>" .. costNum .. "</color>"
|
||||||
else
|
else
|
||||||
this.costNum.text = "<color=#1B262E>" .. costNum .. "</color>"
|
this.costNum.text = "<color=#C8AD83>" .. costNum .. "</color>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue