diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index f11a0599..4b40ab64 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -449,6 +449,59 @@ BattleConst.GRID_OUT_LINE_POS_ID = { [77] = {[76] = true, [66] = true, [67] = true}, } +BattleConst.UP_DOWN_LEFT_RIGHT = { + [11] = {21, 12}, + [12] = {22, 11, 13}, + [13] = {23, 12, 14}, + [14] = {24, 13, 15}, + [15] = {25, 14, 16}, + [16] = {26, 15, 17}, + [17] = {27, 16, }, + [21] = {11, 31, 22}, + [22] = {12, 32, 21, 23}, + [23] = {13, 33, 22, 24}, + [24] = {14, 34, 23, 25}, + [25] = {15, 35, 24, 26}, + [26] = {16, 36, 25, 27}, + [27] = {17, 37, 26, }, + [31] = {21, 41, 32}, + [32] = {22, 42, 31, 33}, + [33] = {23, 43, 32, 34}, + [34] = {24, 44, 33, 35}, + [35] = {25, 45, 34, 36}, + [36] = {26, 46, 35, 37}, + [37] = {27, 47, 36, }, + [41] = {31, 51, 42}, + [42] = {32, 52, 41, 43}, + [43] = {33, 53, 42, 44}, + [44] = {34, 54, 43, 45}, + [45] = {35, 55, 44, 46}, + [46] = {36, 56, 45, 47}, + [47] = {37, 57, 46, }, + [51] = {41, 61, 52}, + [52] = {42, 62, 51, 53}, + [53] = {43, 63, 52, 54}, + [54] = {44, 64, 53, 55}, + [55] = {45, 65, 54, 56}, + [56] = {46, 66, 55, 57}, + [57] = {47, 67, 56, }, + [61] = {51, 71, 62}, + [62] = {52, 72, 61, 63}, + [63] = {53, 73, 62, 64}, + [64] = {54, 74, 63, 65}, + [65] = {55, 75, 64, 66}, + [66] = {56, 76, 65, 67}, + [67] = {57, 77, 66, }, + [71] = {61, 72}, + [72] = {62, 71, 73}, + [73] = {63, 72, 74}, + [74] = {64, 73, 75}, + [75] = {65, 74, 76}, + [76] = {66, 75, 77}, + [77] = {67, 76, }, +} + + ---- 上一排填充的顺序 BattleConst.UP_LINE_FILL_LIST = { [11] = {}, diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 020042b8..99ad059e 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -765,8 +765,8 @@ function BattleController:onLinkOver() end boomGridIds[info.posId] = true - local outline = BattleConst.GRID_OUT_LINE_POS_ID[info.posId] - for aroundPosId, _ in pairs(outline) do + local outline = BattleConst.UP_DOWN_LEFT_RIGHT[info.posId] + for _, aroundPosId in ipairs(outline) do boomGridIds[aroundPosId] = true end diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index 86111901..787a33d9 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -53,6 +53,7 @@ function BattleUI:_display() self:initFxNode() self:hideGenerateSkillGridCells() self:initTutorialNode() + self:initUISfxs() end function BattleUI:_addListeners() @@ -1185,6 +1186,30 @@ function BattleUI:initTutorialNode() self:showTutorialFinger() end +function BattleUI:initUISfxs() + 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(true) + info.obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL1) + 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(true) + info.obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), 11) + info.obj:setActive(false) + end + end + end +end + function BattleUI:showTutorialFinger(posIdList) if self.showTutorialFingerSeq then self.showTutorialFingerSeq:Kill() diff --git a/lua/app/ui/battle/cell/grid_cell.lua b/lua/app/ui/battle/cell/grid_cell.lua index 1172e1a6..2895d37b 100644 --- a/lua/app/ui/battle/cell/grid_cell.lua +++ b/lua/app/ui/battle/cell/grid_cell.lua @@ -161,6 +161,7 @@ function GridCell:setOrder(uiOder) for elementType, name in pairs(GConst.BattleConst.OUTLINE_SFX) do local obj = uiMap["grid_cell.touch_node.ani_node.effect_node." .. name] obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(uiOder, GConst.UI_EFFECT_ORDER.LEVEL1) + obj:setActive(false) end end