逍遥红点 提交

dev_chengFeng
jiaoyangna 2020-12-26 18:39:47 +08:00
parent 1171415e74
commit c1f87eb208
3 changed files with 26 additions and 22 deletions

View File

@ -14570,7 +14570,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &3846356012023416907
RectTransform:
m_ObjectHideFlags: 0
@ -14953,7 +14953,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &5960355823929664244
RectTransform:
m_ObjectHideFlags: 0
@ -15101,7 +15101,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &380723056088198257
RectTransform:
m_ObjectHideFlags: 0
@ -15175,7 +15175,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &8476665353631046778
RectTransform:
m_ObjectHideFlags: 0
@ -15249,7 +15249,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &2858530388760138381
RectTransform:
m_ObjectHideFlags: 0
@ -15323,7 +15323,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &4721900019885054198
RectTransform:
m_ObjectHideFlags: 0
@ -15545,7 +15545,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1434724422673076778
RectTransform:
m_ObjectHideFlags: 0
@ -15693,7 +15693,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &436022206432055614
RectTransform:
m_ObjectHideFlags: 0
@ -15767,7 +15767,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &2972892415376658331
RectTransform:
m_ObjectHideFlags: 0
@ -15841,7 +15841,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &8411801873954532451
RectTransform:
m_ObjectHideFlags: 0

View File

@ -11,6 +11,7 @@ this.GetHeroIndex = 0
this.luckyTurnTableRewards={}
this.luckyluckyTurnTableTimes = 0
this.luckyluckyTurnTableRemainTime = 0
this.isAutoYouli=false --逍遥游自动游历开关
this.first = true
--打开逍遥游地图列表界面
@ -78,17 +79,11 @@ function this.StartXiaoYao()
NetManager.JourneyDoResponse(this.curMapId,function (msg)
--0、普通节点 1、奖励节点 2、双倍节点 3、额外骰子节点 4、招募英雄节点 5、怪物节点 6,转盘
if msg.pathType == 5 then
this.InitMonsterData(msg.monster,2)
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(3)),1)
this.CheckRedPoint2()
this.InitMonsterData(msg.monster,2)
elseif msg.pathType == 6 then
this.InitLuckyTurnTables(msg)
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(2)),1)
this.CheckRedPoint2()
elseif msg.pathType == 4 then
this.InitHeroData(msg.goodsInfo,2)
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(1)),1)
this.CheckRedPoint2()
elseif msg.pathType == 0 then
end
Game.GlobalEvent:DispatchEvent(GameEvent.XiaoYao.StartXiaoYao, msg)
@ -353,9 +348,8 @@ function this.CheckRedPoint(_mapId,_eventId)
if eventId and eventId > 0 and mapId and mapId > 0 then
if PlayerPrefs.GetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(mapId),tostring(eventId))) == 1 then
return true
else
return false
end
return false
elseif mapId and mapId > 0 then
for i = 1 , 3 do
if PlayerPrefs.GetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(mapId),tostring(i))) == 1 then
@ -382,6 +376,7 @@ function this.CheckRedPoint(_mapId,_eventId)
end
end
end
return false
end
return false
end

View File

@ -296,7 +296,7 @@ function this.EventTrigger(_data)
Log("游戏当前时间为:"..PlayerManager.serverTime)
Log("触发事件时间为:".._data.overTime)
if _data.pathType==0 then --普通节点
LogGreen("普通奖励:"..#_data.drop)
--LogGreen("普通奖励:"..#_data.drop)
elseif _data.pathType==1 then --宝箱
Log("获得一个宝箱!")
elseif _data.pathType==2 then --双倍节点
@ -306,12 +306,18 @@ function this.EventTrigger(_data)
saiNum=2
elseif _data.pathType==4 then --东海寻仙节点
targetBtn=this.shopBtn
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(XiaoYaoManager.curMapId),tostring(1)),1)
XiaoYaoManager.CheckRedPoint2()
this.SetEventBtn(_data)
elseif _data.pathType==5 then --怪物节点
targetBtn=this.bossBtn
targetBtn=this.bossBtn
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(XiaoYaoManager.curMapId),tostring(3)),1)
XiaoYaoManager.CheckRedPoint2()
this.SetEventBtn(_data)
elseif _data.pathType==6 then --转盘
targetBtn=this.rouleBtn
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(XiaoYaoManager.curMapId),tostring(2)),1)
XiaoYaoManager.CheckRedPoint2()
this.SetEventBtn(_data)
elseif _data.pathType==7 then --终极大奖
UIManager.OpenPanel(UIName.XiaoYaoEventPanel,0,_data.drop)
@ -478,8 +484,11 @@ end
--刷新界面事件入口按钮显示隐藏
function this.RefreshEventBtn()
this.bossRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,3))
this.rouleRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,2))
--LogGreen("3:"..tostring(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,3)))
this.rouleRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,2))
--LogGreen("2:"..tostring(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,2)))
this.shopRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,1))
--LogGreen("1"..tostring(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,1)))
if XiaoYaoManager.luckyluckyTurnTableTimes > 0 and (XiaoYaoManager.luckyluckyTurnTableRemainTime - PlayerManager.serverTime > 0) then
this.rouleBtn:SetActive(true)
else