层级调整
This commit is contained in:
parent
981c440e5d
commit
c3c2e63ed6
@ -15,7 +15,7 @@ local CacheVector2 = CS.UnityEngine.Vector2(0, 0)
|
|||||||
local CACHE_SKILL_POS_1 = {x = 10, y = 360}
|
local CACHE_SKILL_POS_1 = {x = 10, y = 360}
|
||||||
local CACHE_SKILL_POS_2 = {x = 10, y = 420}
|
local CACHE_SKILL_POS_2 = {x = 10, y = 420}
|
||||||
local BATTLE_COMMON_PATH = "assets/arts/textures/background/battle_common/%s.png"
|
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()
|
function BattleUI:getPrefabPath()
|
||||||
return "assets/prefabs/ui/battle/battle_ui.prefab"
|
return "assets/prefabs/ui/battle/battle_ui.prefab"
|
||||||
@ -1179,7 +1179,7 @@ function BattleUI:initGenerateSkillEffect()
|
|||||||
|
|
||||||
for _, obj in pairs(self.generateSkillSfxs) do
|
for _, obj in pairs(self.generateSkillSfxs) do
|
||||||
obj:setActive(true)
|
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)
|
obj:setActive(false)
|
||||||
end
|
end
|
||||||
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"]
|
local sfx = uiMap["battle_ui.bg_2.lv_node.icon.vfx_ui_battle_progress_light_b01"]
|
||||||
if not self.lastLv then
|
if not self.lastLv then
|
||||||
sfx:setActive(true)
|
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)
|
sfx:setActive(false)
|
||||||
elseif self.lastLv ~= lv then
|
elseif self.lastLv ~= lv then
|
||||||
sfx:setActive(true)
|
sfx:setActive(true)
|
||||||
@ -1611,7 +1611,7 @@ function BattleUI:getSfxGridBreak(breakSfxPath, index, func)
|
|||||||
self.root.gridBreakSfxObjs[breakSfxPath][index] = {
|
self.root.gridBreakSfxObjs[breakSfxPath][index] = {
|
||||||
isLoaded = true
|
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
|
self.root.gridBreakSfxObjs[breakSfxPath][index].obj = obj
|
||||||
if self.hidingAllSfxGridBreak then
|
if self.hidingAllSfxGridBreak then
|
||||||
obj:setActive(false)
|
obj:setActive(false)
|
||||||
@ -1718,13 +1718,13 @@ function BattleUI:initSkillLineSfx()
|
|||||||
|
|
||||||
for _, obj in pairs(self.skillLineSfxs) do
|
for _, obj in pairs(self.skillLineSfxs) do
|
||||||
obj:setActive(true)
|
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)
|
obj:setActive(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, obj in pairs(self.skillLightSfxs) do
|
for _, obj in pairs(self.skillLightSfxs) do
|
||||||
obj:setActive(true)
|
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)
|
obj:setActive(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1812,7 +1812,7 @@ function BattleUI:playChangeElementSfx(posId, index)
|
|||||||
self.root.changeElementSfxs[index] = {
|
self.root.changeElementSfxs[index] = {
|
||||||
isLoaded = true
|
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
|
self.root.changeElementSfxs[index].obj = obj
|
||||||
obj:setAnchoredPosition(pos.x, pos.y)
|
obj:setAnchoredPosition(pos.x, pos.y)
|
||||||
obj:play()
|
obj:play()
|
||||||
@ -1833,7 +1833,7 @@ function BattleUI:initUISfxs()
|
|||||||
for index, info in pairs(map) do
|
for index, info in pairs(map) do
|
||||||
if info.obj then
|
if info.obj then
|
||||||
info.obj:setActive(true)
|
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)
|
info.obj:setActive(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1864,7 +1864,7 @@ function BattleUI:initUISfxs()
|
|||||||
for index, info in pairs(self.root.changeElementSfxs) do
|
for index, info in pairs(self.root.changeElementSfxs) do
|
||||||
if info.obj then
|
if info.obj then
|
||||||
info.obj:setActive(true)
|
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)
|
info.obj:setActive(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -208,11 +208,11 @@ function GridCell:setOrder(uiOder)
|
|||||||
local uiMap = self:getUIMap()
|
local uiMap = self:getUIMap()
|
||||||
for elementType, name in pairs(GConst.BattleConst.OUTLINE_SFX) do
|
for elementType, name in pairs(GConst.BattleConst.OUTLINE_SFX) do
|
||||||
local obj = uiMap["grid_cell.touch_node.ani_node.effect_node." .. name]
|
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)
|
obj:setActive(false)
|
||||||
end
|
end
|
||||||
local skillEffect = uiMap["grid_cell.touch_node.ani_node.effect_node.sfx_piece_qizi_b06"]
|
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)
|
skillEffect:setActive(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user