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