From e232a344cc8cbbdf56fd7bff8c2f7d3b49ede53e Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Wed, 26 Apr 2023 12:05:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E4=B8=80=E4=BA=9B=E7=89=B9?= =?UTF-8?q?=E6=95=88=EF=BC=8C=E8=8A=82=E7=9C=81=E4=B8=80=E4=B8=8B=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../battle/controller/battle_controller.lua | 2 + lua/app/ui/battle/battle_ui.lua | 52 +++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 5e8a3b55..516c56c0 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -412,6 +412,8 @@ function BattleController:enterElimination(needDelay) self.battleUI:showSelectSkillComp(self:getRandomSkillList()) end else + self.battleUI:hideAllBoardSfxs() + -- 检查棋盘 local find, pathList = self:findAttention() if not find then -- 如果没找到,就要打乱棋盘 diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index f682841f..9a061920 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -1680,6 +1680,58 @@ function BattleUI:showSelectSkillComp(skillList) self.selectSkillComp:refresh(skillList) end +function BattleUI:hideAllBoardSfxs() + if self.generateSkillSfxs then + for _, obj in pairs(self.generateSkillSfxs) do + obj:setActive(false) + end + end + + if self.skillLineSfxs then + for _, obj in pairs(self.skillLineSfxs) do + obj:setActive(false) + end + end + + if self.skillLightSfxs then + for _, obj in pairs(self.skillLightSfxs) do + obj:setActive(false) + end + end + + if self.changeElementSfxs then + for _, obj in pairs(self.changeElementSfxs) do + obj:setActive(false) + end + end + + if self.root.gridBreakSfxObjs then + for gridType, map in pairs(self.root.gridBreakSfxObjs) do + for index, info in pairs(map) do + if info.obj then + info.obj:setActive(false) + end + end + end + end + + if self.root.lineSfxObjs then + for index, info in pairs(self.root.lineSfxObjs) do + if info.obj then + info.obj:setActive(false) + end + end + end + + if self.root.smokeSfxObjs then + for index, info in pairs(self.root.smokeSfxObjs) do + if info.obj then + info.obj:setActive(false) + end + end + end +end + function BattleUI:clear() if self.alreadyClear then return