From a32c76c9a0f16d725329f79275c8e89241beb25d Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Thu, 18 Aug 2022 16:32:06 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A5=9E=E7=BD=97=E7=8E=AF=E5=A2=83]=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=E6=97=A0=E6=B3=95=E9=87=8D=E5=A4=8D=E6=89=AB?= =?UTF-8?q?=E8=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua | 2 ++ .../ManagedResources/~Lua/Modules/Map/MapTrialManager.lua | 1 + Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua | 7 ++++++- .../Modules/Popup/View/GeneralPopup_TrialToNextFloor.lua | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua index dce84866c7..d0720e5865 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua @@ -69,6 +69,8 @@ function this:InitComponent() this.FloatBlood = Util.GetGameObject(self.gameObject, "FloatBlood") this.FloatBlood.gameObject:SetActive(false) + this.btn_sweep=Util.GetGameObject(self.gameObject, "btn_sweep") + this.btn_sweep:SetActive(false) this.UI_effect_shilian_tab = Util.GetGameObject(self.gameObject, "UI_effect_shilian_tab") diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapTrialManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapTrialManager.lua index 19c0892887..032acb6119 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/MapTrialManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/MapTrialManager.lua @@ -32,6 +32,7 @@ function this.Initialize() this.killCount=0 --已击杀小怪数量 this.bombUsed=0 --炸弹已使用次数 this.towerCleanFloor=0 --可以扫荡的层数 + this.isSweep=false --是否可以扫荡 end -- function this.RefreshTrialInfo(towerCopyInfo) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua index afab39338d..f68ae2d315 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua @@ -88,6 +88,10 @@ function TrialMapPanel:BindEvent() --扫荡按钮 Util.AddClick(this.btn_sweep,function() + if MapTrialManager.isSweep then + PopupTipPanel.ShowTip("无法再次扫荡") + return + end NetManager.TowerCleanfloorRequest(function() NetManager.MapInfoRequest(MapManager.curCarbonType, function(msg) MapPanel.Dispose() @@ -97,6 +101,7 @@ function TrialMapPanel:BindEvent() MapManager.curAreaId =FormationTypeDef.FORMATION_DREAMLAND MapTrialManager.isHaveBoss = false MapManager.isTimeOut = false + MapTrialManager.isSweep=true SwitchPanel.OpenPanel(UIName.MapPanel) end) end) @@ -184,7 +189,7 @@ function TrialMapPanel:OnOpen() if MapTrialManager.curTowerLevel<=MapTrialManager.towerCleanFloor then this.btn_sweep:SetActive(true) else - this.btn_sweep:SetActive(true) + this.btn_sweep:SetActive(false) end -- 检测引导 diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_TrialToNextFloor.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_TrialToNextFloor.lua index f831fcfa30..deb51030eb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_TrialToNextFloor.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_TrialToNextFloor.lua @@ -21,6 +21,7 @@ function this:BindEvent() Util.AddClick(this.btnSure,function() local optionId = eventConfig[eventId].Option[1] + MapTrialManager.isSweep=false OptionBehaviourManager.JumpEventPoint(eventId, optionId,UIManager.GetOpenPanel(UIName.GeneralPopup)) end) end