层级调整
This commit is contained in:
parent
c60d8cfdcb
commit
7fdadd75b4
@ -157,6 +157,7 @@ GConst.TYPEOF_UNITY_CLASS = {
|
||||
BF_UNITY_SLIDER = typeof(CS.BF.BFUnitySlider),
|
||||
BF_ELIMINATION_TOUCH_EVENT = typeof(CS.BF.EliminationTouchEvent),
|
||||
BF_UI_SPINE_HELPER = typeof(CS.BF.UISpineHelper),
|
||||
BF_CANVAS_SORTING_ORDER_HELPER = typeof(CS.BF.CanvasSortingOrderHelper),
|
||||
}
|
||||
|
||||
-- lua 组件
|
||||
|
||||
@ -29,6 +29,21 @@ function BattleUI:initBaseInfo()
|
||||
self.aniNode = uiMap["battle_ui.bg_2.ani_node"]
|
||||
self.gridEdgeNode = uiMap["battle_ui.bg_2.board_node.board_center_node.grid_edge_node"]
|
||||
self.gridEdgeCacheCell = uiMap["battle_ui.cache_node.grid_edge_cell"]
|
||||
self.topNode = uiMap["battle_ui.top_node"]
|
||||
|
||||
if self.topNode then
|
||||
local comp = self.topNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_CANVAS_SORTING_ORDER_HELPER)
|
||||
if not comp then
|
||||
comp = self.topNode:addComponent(GConst.TYPEOF_UNITY_CLASS.BF_CANVAS_SORTING_ORDER_HELPER)
|
||||
end
|
||||
local gr = self.topNode:getComponent(GConst.TYPEOF_UNITY_CLASS.GRAPHIC_RAYCASTER)
|
||||
if not gr then
|
||||
self.topNode:addComponent(GConst.TYPEOF_UNITY_CLASS.GRAPHIC_RAYCASTER)
|
||||
end
|
||||
if comp then
|
||||
comp:SetSortingOrder(self:getUIOrder(), 12)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function BattleUI:initBg()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user