万能块特效

This commit is contained in:
puxuan 2025-10-31 15:30:58 +08:00
parent 37550a3013
commit 4e3871a39d

View File

@ -202,24 +202,51 @@ function GridCell:showHighLight(show, mainElementType)
end end
end end
local find = false if not self.universalSfxObjs then
for type, obj in pairs(self.outLineSfxObjs) do self.universalSfxObjs = {}
if show and not find then for i = 1, 5 do
if skillId then self.universalSfxObjs[i] = uiMap["grid_cell.touch_node.ani_node.effect_node.sfx_piece_qizi_b06_" .. i]
if type == "skill" then end
end
if isUniversal then
for k,v in pairs(self.universalSfxObjs) do
if mainElementType and mainElementType == k then
v:setActive(show)
else
v:setActive(false)
end
end
for k,v in pairs(self.outLineSfxObjs) do
if not mainElementType and "skill" == k then
v:setActive(show)
else
v:setActive(false)
end
end
else
for k,v in pairs(self.universalSfxObjs) do
v:setActive(false)
end
local find = false
for type, obj in pairs(self.outLineSfxObjs) do
if show and not find then
if skillId then
if type == "skill" then
find = true
end
elseif elementType == type then
find = true find = true
end end
elseif elementType == type then if find then
find = true if self.lastShowHlElementType ~= type then
end self.lastShowHlElementType = type
if find then end
if self.lastShowHlElementType ~= type then
self.lastShowHlElementType = type
end end
obj:setActive(find)
else
obj:setActive(false)
end end
obj:setActive(find)
else
obj:setActive(false)
end end
end end
if not find then if not find then
@ -292,6 +319,12 @@ function GridCell:setOrder(uiOder)
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.LEVEL4 + 1) skillEffect:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(uiOder, GConst.UI_EFFECT_ORDER.LEVEL4 + 1)
skillEffect:setActive(false) skillEffect:setActive(false)
for i = 1, 5 do
local obj = uiMap["grid_cell.touch_node.ani_node.effect_node.sfx_piece_qizi_b06_" .. i]
obj:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(uiOder, GConst.UI_EFFECT_ORDER.LEVEL4 + 1)
obj:setActive(false)
end
end end
function GridCell:setGridTypeIcon(icon) function GridCell:setGridTypeIcon(icon)