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