From b250299dc43438c656280e8078d2a35255482208 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Sun, 23 Apr 2023 19:02:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E9=99=A4=E6=8A=80=E8=83=BD=E7=89=B9?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/global/global_const.lua | 3 ++- lua/app/module/battle/battle_const.lua | 3 ++- lua/app/ui/battle/cell/grid_cell.lua | 23 +++++++++++++++++------ 3 files changed, 21 insertions(+), 8 deletions(-) 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 15ae8e24..9f1ad0da 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -591,7 +591,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