Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有嵌套树:
self.addChild(red); self.addChild(green); green.addChild(blue);
我明白了:(截图)
我怎样才能把蓝色方块放在别人后面,而不改变我的树让它看起来像这样:(截图)
setGlobalZOrder(), 什么也没做:
setGlobalZOrder()
red.setGlobalZOrder(2); green.setGlobalZOrder(3); blue.setGlobalZOrder(1);
有没有办法做到这一点?
谢谢。
我在github上得到了答案:
全局 z 顺序仅影响Sprite对象。 Github问题链接
全局 z 顺序仅影响Sprite对象。
Sprite
Github问题链接
所以它对我不起作用,因为我正在玩LayerColor.
LayerColor