挂机修改提交
parent
718e52d874
commit
4b9a2cca1e
|
|
@ -541,16 +541,21 @@ function this.ShowBattleInfo()
|
|||
end
|
||||
end
|
||||
|
||||
if this.timer then
|
||||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
|
||||
end
|
||||
|
||||
|
||||
function this.BattleLogic()
|
||||
if this.battleTimer then
|
||||
this.battleTimer:Stop()
|
||||
this.battleTimer = nil
|
||||
end
|
||||
local cd=0
|
||||
local battleTime=curSoliderStageConfig.Time
|
||||
local bossHp=curSoliderStageConfig.Hp
|
||||
local isHit=false
|
||||
LogError("curSoliderStageConfig.Time===="..curSoliderStageConfig.Time.." curSoliderStageConfig.Hp=="..curSoliderStageConfig.Hp)
|
||||
this.timer = Timer.New(function()
|
||||
this.battleTimer = Timer.New(function()
|
||||
cd=cd+1
|
||||
--每隔三秒攻击一次
|
||||
|
||||
|
|
@ -619,15 +624,15 @@ function this.ShowBattleInfo()
|
|||
--战斗时间到了,重头开始打
|
||||
if battleTime<=0 then
|
||||
LogError("战斗结束")
|
||||
this.timer:Stop()
|
||||
this.battleTimer:Stop()
|
||||
cd=0
|
||||
battleTime=curSoliderStageConfig.Time
|
||||
bossHp=curSoliderStageConfig.Hp
|
||||
this.timer:Start()
|
||||
this.battleTimer:Start()
|
||||
end
|
||||
if bossHp<=0 then
|
||||
LogError("boss被击败")
|
||||
this.timer:Stop()
|
||||
this.battleTimer:Stop()
|
||||
NetManager.SoldierFightCheckRequest(function(msg)
|
||||
--战斗成功
|
||||
if msg.result==1 then
|
||||
|
|
@ -648,7 +653,7 @@ function this.ShowBattleInfo()
|
|||
--刷新挂机奖励
|
||||
this.IntiReward()
|
||||
end
|
||||
this.timer:Start()
|
||||
this.battleTimer:Start()
|
||||
cd=0
|
||||
battleTime=curSoliderStageConfig.Time
|
||||
bossHp=curSoliderStageConfig.Hp
|
||||
|
|
@ -656,9 +661,12 @@ function this.ShowBattleInfo()
|
|||
end)
|
||||
end
|
||||
end, 1, -1, true)
|
||||
this.timer:Start()
|
||||
this.battleTimer:Start()
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
function this.SetInitAnim()
|
||||
-- 隐藏界面特效
|
||||
-- count = 1
|
||||
|
|
@ -761,6 +769,7 @@ end
|
|||
function FightPointPassMainPanel:OnShow()
|
||||
--LogError("SmallSoldierManager.changeSolider.type=========="..SmallSoldierManager.changeSolider.type)
|
||||
this.RefreshSoliderInfo()
|
||||
this.BattleLogic()
|
||||
CheckRedPointStatus(RedPointType.XiaoYaoYouRedPoint)
|
||||
CheckRedPointStatus(RedPointType.numberGame)
|
||||
local activityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FirstRecharge)
|
||||
|
|
@ -1287,6 +1296,11 @@ function FightPointPassMainPanel:OnDestroy()
|
|||
soliderPreList={}
|
||||
this.bossLiveGO=nil
|
||||
this.bossLiveName=nil
|
||||
this.Floater:Dispose()
|
||||
if this.battleTimer then
|
||||
this.battleTimer:Stop()
|
||||
this.battleTimer=nil
|
||||
end
|
||||
end
|
||||
--跳转显示新手提示圈
|
||||
function FightPointPassMainPanel.ShowGuideGo(btnIndex)
|
||||
|
|
|
|||
Loading…
Reference in New Issue