【心魔试炼】点击快速战斗偶先报错卡死
parent
c723fa04af
commit
21ec904da5
|
@ -143,7 +143,12 @@ function MonsterCampNewPanel:BindEvent()
|
||||||
end
|
end
|
||||||
|
|
||||||
--快速战斗
|
--快速战斗
|
||||||
|
local isClick = false
|
||||||
function this.QuickStartMonsterFightRequest()
|
function this.QuickStartMonsterFightRequest()
|
||||||
|
if isClick then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
isClick = true
|
||||||
-- 请求战斗结果
|
-- 请求战斗结果
|
||||||
NetManager.GetMonsterFightResult(MonsterCampManager.monsterWave, FormationTypeDef.MONSTER_CAMP_ATTACK, function (msg)
|
NetManager.GetMonsterFightResult(MonsterCampManager.monsterWave, FormationTypeDef.MONSTER_CAMP_ATTACK, function (msg)
|
||||||
local result = {}
|
local result = {}
|
||||||
|
@ -160,12 +165,16 @@ function this.QuickStartMonsterFightRequest()
|
||||||
BattleManager.SetLastBattleResult(this.lastBattleResult,BATTLE_TYPE.MONSTER_CAMP)
|
BattleManager.SetLastBattleResult(this.lastBattleResult,BATTLE_TYPE.MONSTER_CAMP)
|
||||||
if msg.result == 0 then
|
if msg.result == 0 then
|
||||||
UIManager.OpenPanel(UIName.BattleFailPopup, nil, true, UIName.MonsterCampNewPanel)
|
UIManager.OpenPanel(UIName.BattleFailPopup, nil, true, UIName.MonsterCampNewPanel)
|
||||||
|
isClick = false
|
||||||
else
|
else
|
||||||
|
|
||||||
MonsterCampManager.monsterWave = MonsterCampManager.monsterWave + 1
|
MonsterCampManager.monsterWave = MonsterCampManager.monsterWave + 1
|
||||||
UIManager.OpenPanel(UIName.BattleWinPopup, nil, false, BATTLE_TYPE.MONSTER_CAMP, result, true, true,function()
|
UIManager.OpenPanel(UIName.BattleWinPopup, nil, false, BATTLE_TYPE.MONSTER_CAMP, result, true, true,function()
|
||||||
-- UIManager.OpenPanel(UIName.RewardItemPopup,msg.enventDrop,1,function()
|
-- UIManager.OpenPanel(UIName.RewardItemPopup,msg.enventDrop,1,function()
|
||||||
this.OnShowPanel()--刷新界面
|
this.OnShowPanel()--刷新界面
|
||||||
|
Timer.New(function ()
|
||||||
|
isClick = false
|
||||||
|
end,0.5):Start()
|
||||||
-- end)
|
-- end)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue