parent
9306f7b3e8
commit
417fc6a90d
|
@ -26,7 +26,7 @@ this.funcBtnList = {}
|
||||||
local curMianTaskData = {}
|
local curMianTaskData = {}
|
||||||
local timePressStarted
|
local timePressStarted
|
||||||
local callBack
|
local callBack
|
||||||
|
this.thread=nil --协程
|
||||||
local count = 1
|
local count = 1
|
||||||
local autoTimer=nil
|
local autoTimer=nil
|
||||||
local maxKillNum=10
|
local maxKillNum=10
|
||||||
|
@ -322,7 +322,9 @@ function FightPointPassMainPanel:BindEvent()
|
||||||
autoTimer=nil
|
autoTimer=nil
|
||||||
end
|
end
|
||||||
UIManager.OpenPanel(UIName.SmallSoldierAutoPanel)
|
UIManager.OpenPanel(UIName.SmallSoldierAutoPanel)
|
||||||
autoTimer=Timer.New(function ()
|
this.thread=coroutine.start(function()
|
||||||
|
|
||||||
|
while SmallSoldierManager.isAuto do
|
||||||
if SmallSoldierManager.isAuto==false then
|
if SmallSoldierManager.isAuto==false then
|
||||||
if autoTimer then
|
if autoTimer then
|
||||||
autoTimer:Stop()
|
autoTimer:Stop()
|
||||||
|
@ -341,13 +343,19 @@ function FightPointPassMainPanel:BindEvent()
|
||||||
UIManager.ClosePanel(UIName.SmallSoldierAutoPanel)
|
UIManager.ClosePanel(UIName.SmallSoldierAutoPanel)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
coroutine.wait(3)
|
||||||
if SmallSoldierManager.changeSolider==nil then
|
if SmallSoldierManager.changeSolider==nil then
|
||||||
NetManager.RecruitSoldierRequest(function ()
|
NetManager.RecruitSoldierRequest(function ()
|
||||||
this.RefreshSoliderInfo()
|
this.RefreshSoliderInfo()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
-- autoTimer=Timer.New(function ()
|
||||||
|
|
||||||
|
|
||||||
|
-- end,4,-1,true):Start()
|
||||||
|
end)
|
||||||
|
|
||||||
end,4,-1,true):Start()
|
|
||||||
UIManager.OpenPanel(UIName.SmallSoldierAutoPanel)
|
UIManager.OpenPanel(UIName.SmallSoldierAutoPanel)
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.costImg.gameObject,function ()
|
Util.AddClick(this.costImg.gameObject,function ()
|
||||||
|
@ -1600,7 +1608,10 @@ function FightPointPassMainPanel:OnClose()
|
||||||
-- fightMap:OnClose()
|
-- fightMap:OnClose()
|
||||||
-- hasMap = false
|
-- hasMap = false
|
||||||
-- end
|
-- end
|
||||||
|
if this.thread then
|
||||||
|
coroutine.stop(this.thread)
|
||||||
|
this.thread=nil
|
||||||
|
end
|
||||||
if timer1 then
|
if timer1 then
|
||||||
timer1:Stop()
|
timer1:Stop()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue