diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua index 3c9b33d0..11bc6055 100644 --- a/lua/app/global/global_const.lua +++ b/lua/app/global/global_const.lua @@ -307,7 +307,8 @@ GConst.UI_EFFECT_ORDER = { LEVEL2 = 40, LEVEL3 = 60, LEVEL4 = 80, - LEVEL5 = 100 + LEVEL5 = 100, + LEVEL_10 = 10, } GConst.LANGUAGE = { diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index 3527c4d7..87a5c9e3 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -598,7 +598,8 @@ BattleConst.OUTLINE_SFX = { [BattleConst.ELEMENT_TYPE.YELLOW] = "sfx_piece_qizi_b02", [BattleConst.ELEMENT_TYPE.GREEN] = "sfx_piece_qizi_b04", [BattleConst.ELEMENT_TYPE.BLUE] = "sfx_piece_qizi_b05", - [BattleConst.ELEMENT_TYPE.PURPLE] = "sfx_piece_qizi_b01" + [BattleConst.ELEMENT_TYPE.PURPLE] = "sfx_piece_qizi_b01", + skill = "sfx_piece_qizi_b06", } BattleConst.LINE_SFX = "assets/prefabs/effects/battle/sfx_piece_line_b01.prefab" diff --git a/lua/app/ui/battle/cell/grid_cell.lua b/lua/app/ui/battle/cell/grid_cell.lua index 8d283da6..df3c8e22 100644 --- a/lua/app/ui/battle/cell/grid_cell.lua +++ b/lua/app/ui/battle/cell/grid_cell.lua @@ -120,11 +120,19 @@ function GridCell:showHighLight(show, mainElementType, parentUI) local find = false for type, obj in pairs(self.outLineSfxObjs) do - if show and type == elementType then - find = true - if self.lastShowHlElementType ~= elementType then - self.lastShowHlElementType = elementType - obj:setActive(true) + if show then + if skillId then + if type == "skill" then + find = true + end + elseif elementType == type then + find = true + end + if find then + if self.lastShowHlElementType ~= elementType then + self.lastShowHlElementType = elementType + obj:setActive(true) + end end else obj:setActive(false) @@ -165,9 +173,12 @@ function GridCell:setOrder(uiOder) local uiMap = self:getUIMap() 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:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(uiOder, GConst.UI_EFFECT_ORDER.LEVEL_10) obj:setActive(false) end + local skillEffect = uiMap["grid_cell.touch_node.ani_node.effect_node.sfx_piece_qizi_b06"] + skillEffect:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(uiOder, GConst.UI_EFFECT_ORDER.LEVEL_10) + skillEffect:setActive(false) end return GridCell \ No newline at end of file