关闭一些特效,节省一下性能

This commit is contained in:
xiekaidong 2023-04-26 12:05:43 +08:00
parent 9e4db809a7
commit e232a344cc
2 changed files with 54 additions and 0 deletions

View File

@ -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 -- 如果没找到,就要打乱棋盘

View File

@ -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