万能块特效
This commit is contained in:
parent
37550a3013
commit
4e3871a39d
@ -202,6 +202,32 @@ function GridCell:showHighLight(show, mainElementType)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not self.universalSfxObjs then
|
||||||
|
self.universalSfxObjs = {}
|
||||||
|
for i = 1, 5 do
|
||||||
|
self.universalSfxObjs[i] = uiMap["grid_cell.touch_node.ani_node.effect_node.sfx_piece_qizi_b06_" .. i]
|
||||||
|
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
|
local find = false
|
||||||
for type, obj in pairs(self.outLineSfxObjs) do
|
for type, obj in pairs(self.outLineSfxObjs) do
|
||||||
if show and not find then
|
if show and not find then
|
||||||
@ -222,6 +248,7 @@ function GridCell:showHighLight(show, mainElementType)
|
|||||||
obj:setActive(false)
|
obj:setActive(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if not find then
|
if not find then
|
||||||
self.lastShowHlElementType = nil
|
self.lastShowHlElementType = nil
|
||||||
end
|
end
|
||||||
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user