I have nested tree:
self.addChild(red);
self.addChild(green);
green.addChild(blue);
I get this: (Screenshot)
How can I put blue square behind others, without changing my tree to make it look like this: (Screenshot)
setGlobalZOrder()
, does nothing:
red.setGlobalZOrder(2);
green.setGlobalZOrder(3);
blue.setGlobalZOrder(1);
Is there any way of doing this?
Thanks.
I got the answer on github:
The global z order is affecting only for
Sprite
objects.
So it didn't work for me, because I was playing with LayerColor
.