万能块特效
This commit is contained in:
parent
37550a3013
commit
4e3871a39d
@ -202,24 +202,51 @@ function GridCell:showHighLight(show, mainElementType)
|
||||
end
|
||||
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
|
||||
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
|
||||
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
|
||||
end
|
||||
elseif elementType == type then
|
||||
find = true
|
||||
end
|
||||
if find then
|
||||
if self.lastShowHlElementType ~= type then
|
||||
self.lastShowHlElementType = type
|
||||
if find then
|
||||
if self.lastShowHlElementType ~= type then
|
||||
self.lastShowHlElementType = type
|
||||
end
|
||||
end
|
||||
obj:setActive(find)
|
||||
else
|
||||
obj:setActive(false)
|
||||
end
|
||||
obj:setActive(find)
|
||||
else
|
||||
obj:setActive(false)
|
||||
end
|
||||
end
|
||||
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"]
|
||||
skillEffect:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_EFFECT_HELPER):SetSortingOrder(uiOder, GConst.UI_EFFECT_ORDER.LEVEL4 + 1)
|
||||
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
|
||||
|
||||
function GridCell:setGridTypeIcon(icon)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user