From cb93b0e02d1eeb98f73f497f02daf7478aad6647 Mon Sep 17 00:00:00 2001 From: "PC-202302260912\\Administrator" <1545929779@qq.com> Date: Thu, 16 May 2024 18:25:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=85=B5=E6=8A=BD=E5=8D=A1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Fight/FightPointPassMainPanel.lua | 4 +++- .../~Lua/Modules/Gem/SmallSoldierInfoPanel.lua | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua index dbfd46e566..0870cbd3b7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua @@ -943,7 +943,9 @@ function this.BattleLogic() PlayerPrefs.SetInt("SmallSoldierFailed"..PlayerManager.uid,FightPointPassManager.soldierLayerId) end end - this.battleTimer:Start() + if this.battleTimer then + this.battleTimer:Start() + end cd=0 battleTime=curSoliderStageConfig.Time bossHp=curSoliderStageConfig.Hp diff --git a/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua index c570364531..dc4485de8c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua @@ -174,7 +174,7 @@ function SmallSoldierInfoPanel:OnShow() self.skipImg:SetActive(state==1) if SmallSoldierManager.isAuto then - soliderAutoTimer = Timer.New(function () + --soliderAutoTimer = Timer.New(function () if SmallSoldierManager.isAuto then if oldData==nil then NetManager.ReplaceSoldierRequest(1,0,function () @@ -186,7 +186,10 @@ function SmallSoldierInfoPanel:OnShow() end isUp=true Game.GlobalEvent:DispatchEvent(GameEvent.Solider.ShowSoliderChangeInfo,newData.type,isUp) - self:ClosePanel() + soliderAutoTimer = Timer.New(function () + self:ClosePanel() + end,0.3,1,true):Start() + end) else if isNewUp then @@ -202,19 +205,22 @@ function SmallSoldierInfoPanel:OnShow() end Game.GlobalEvent:DispatchEvent(GameEvent.Solider.ShowSoliderChangeInfo,newData.type,isUp) - - self:ClosePanel() + soliderAutoTimer = Timer.New(function () + self:ClosePanel() + end,0.3,1,true):Start() end) else NetManager.ReplaceSoldierRequest(2,0,function () - self:ClosePanel() + soliderAutoTimer = Timer.New(function () + self:ClosePanel() + end,0.3,1,true):Start() end) end end end - end,0.3,1,true):Start() + --end,0.3,1,true):Start() end end