From c3c2e63ed63beb1ebee93bc5be533908ac98ec47 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Tue, 30 May 2023 22:04:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=82=E7=BA=A7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/battle/battle_ui.lua | 18 +++++++++--------- lua/app/ui/battle/cell/grid_cell.lua | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index 8a0aa065..79fbef50 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -15,7 +15,7 @@ local CacheVector2 = CS.UnityEngine.Vector2(0, 0) local CACHE_SKILL_POS_1 = {x = 10, y = 360} local CACHE_SKILL_POS_2 = {x = 10, y = 420} local BATTLE_COMMON_PATH = "assets/arts/textures/background/battle_common/%s.png" -local BOARD_SFX_ORDER = 13 +local BOARD_SFX_ORDER = GConst.UI_EFFECT_ORDER.LEVEL4 + 1 function BattleUI:getPrefabPath() return "assets/prefabs/ui/battle/battle_ui.prefab" @@ -1179,7 +1179,7 @@ function BattleUI:initGenerateSkillEffect() for _, obj in pairs(self.generateSkillSfxs) do obj:setActive(true) - obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL1) + obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) obj:setActive(false) end end @@ -1530,7 +1530,7 @@ function BattleUI:refreshLv() local sfx = uiMap["battle_ui.bg_2.lv_node.icon.vfx_ui_battle_progress_light_b01"] if not self.lastLv then sfx:setActive(true) - sfx:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL1) + sfx:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) sfx:setActive(false) elseif self.lastLv ~= lv then sfx:setActive(true) @@ -1611,7 +1611,7 @@ function BattleUI:getSfxGridBreak(breakSfxPath, index, func) self.root.gridBreakSfxObjs[breakSfxPath][index] = { isLoaded = true } - EffectManager:loadUIEffectAsync(breakSfxPath, self, self.gridNode, GConst.UI_EFFECT_ORDER.LEVEL1, function(obj) + EffectManager:loadUIEffectAsync(breakSfxPath, self, self.gridNode, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj) self.root.gridBreakSfxObjs[breakSfxPath][index].obj = obj if self.hidingAllSfxGridBreak then obj:setActive(false) @@ -1718,13 +1718,13 @@ function BattleUI:initSkillLineSfx() for _, obj in pairs(self.skillLineSfxs) do obj:setActive(true) - obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL2) + obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) obj:setActive(false) end for _, obj in pairs(self.skillLightSfxs) do obj:setActive(true) - obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL2) + obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) obj:setActive(false) end end @@ -1812,7 +1812,7 @@ function BattleUI:playChangeElementSfx(posId, index) self.root.changeElementSfxs[index] = { isLoaded = true } - EffectManager:loadUIEffectAsync(GConst.BattleConst.CHANGE_ELEMENT_SFX, self, self.gridNode, GConst.UI_EFFECT_ORDER.LEVEL2, function(obj) + EffectManager:loadUIEffectAsync(GConst.BattleConst.CHANGE_ELEMENT_SFX, self, self.gridNode, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj) self.root.changeElementSfxs[index].obj = obj obj:setAnchoredPosition(pos.x, pos.y) obj:play() @@ -1833,7 +1833,7 @@ function BattleUI:initUISfxs() 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:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) info.obj:setActive(false) end end @@ -1864,7 +1864,7 @@ function BattleUI:initUISfxs() for index, info in pairs(self.root.changeElementSfxs) 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.LEVEL2) + info.obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(self:getUIOrder(), GConst.UI_EFFECT_ORDER.LEVEL5) info.obj:setActive(false) end end diff --git a/lua/app/ui/battle/cell/grid_cell.lua b/lua/app/ui/battle/cell/grid_cell.lua index 0bd23dfb..d0f88f5f 100644 --- a/lua/app/ui/battle/cell/grid_cell.lua +++ b/lua/app/ui/battle/cell/grid_cell.lua @@ -208,11 +208,11 @@ 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.LEVEL_10) + obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(uiOder, GConst.UI_EFFECT_ORDER.LEVEL4 + 1) 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:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(uiOder, GConst.UI_EFFECT_ORDER.LEVEL4 + 1) skillEffect:setActive(false) end