逍遥游地图界面优化:1.自动游历返回时提示二级确认弹窗 2.记录自动游历状态
parent
ecd0cc8f22
commit
8cb68ceaa4
|
|
@ -19,7 +19,7 @@ function this:BindEvent()
|
||||||
Util.AddClick(this.btnBack, function()
|
Util.AddClick(this.btnBack, function()
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
if triggertype==0 then
|
if triggertype==0 then
|
||||||
XiaoYaoManager.OpenMapList()
|
UIManager.ClosePanel(UIName.XiaoYaoMapPanel)
|
||||||
end
|
end
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ this.GetHeroIndex = 0
|
||||||
this.luckyTurnTableRewards={}
|
this.luckyTurnTableRewards={}
|
||||||
this.luckyluckyTurnTableTimes = 0
|
this.luckyluckyTurnTableTimes = 0
|
||||||
this.luckyluckyTurnTableRemainTime = 0
|
this.luckyluckyTurnTableRemainTime = 0
|
||||||
|
this.isAutoYouli=false --逍遥游自动游历开关
|
||||||
|
|
||||||
--打开逍遥游地图列表界面
|
--打开逍遥游地图列表界面
|
||||||
function this.OpenMapList()
|
function this.OpenMapList()
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,12 @@ function this:BindEvent()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Util.AddClick(this.btnBack, function ()
|
Util.AddClick(this.btnBack, function ()
|
||||||
-- XiaoYaoManager.OpenMapList()
|
if isAutoRun then
|
||||||
|
MsgPanel.ShowTwo("退出后将停止自动游历,确定离开?", nil, function()
|
||||||
|
self:ClosePanel()
|
||||||
|
end)
|
||||||
|
return
|
||||||
|
end
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
--商店点击
|
--商店点击
|
||||||
|
|
@ -118,6 +123,7 @@ function this:BindEvent()
|
||||||
else
|
else
|
||||||
isAuto=true
|
isAuto=true
|
||||||
end
|
end
|
||||||
|
XiaoYaoManager.isAutoYouli=isAuto
|
||||||
this.toggle.gameObject:SetActive(isAuto)
|
this.toggle.gameObject:SetActive(isAuto)
|
||||||
end)
|
end)
|
||||||
--开始游历
|
--开始游历
|
||||||
|
|
@ -128,7 +134,7 @@ function this:BindEvent()
|
||||||
end
|
end
|
||||||
if curGridIndex>=#allGridData then
|
if curGridIndex>=#allGridData then
|
||||||
MsgPanel.ShowTwo("已到达终点,是否重新云游!", nil, function()
|
MsgPanel.ShowTwo("已到达终点,是否重新云游!", nil, function()
|
||||||
XiaoYaoManager.OpenMapList()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
@ -290,10 +296,8 @@ end
|
||||||
|
|
||||||
--取消自动游历
|
--取消自动游历
|
||||||
function this.StopAuto()
|
function this.StopAuto()
|
||||||
isAuto=false
|
|
||||||
isAutoRun=false
|
isAutoRun=false
|
||||||
this.youliTag:SetActive(false)
|
this.youliTag:SetActive(false)
|
||||||
this.toggle.gameObject:SetActive(false)
|
|
||||||
end
|
end
|
||||||
--事件触发处理
|
--事件触发处理
|
||||||
function this.EventTrigger(_data)
|
function this.EventTrigger(_data)
|
||||||
|
|
@ -599,6 +603,8 @@ function this:OnShow()
|
||||||
isAutoRun=false
|
isAutoRun=false
|
||||||
isPlayMove=0
|
isPlayMove=0
|
||||||
this.startBtn:GetComponent("Button").enabled=true
|
this.startBtn:GetComponent("Button").enabled=true
|
||||||
|
isAuto=XiaoYaoManager.isAutoYouli
|
||||||
|
this.toggle.gameObject:SetActive(isAuto)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:OnSortingOrderChange()
|
function this:OnSortingOrderChange()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue