Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Totally confused with GlobalZOrder #14675

Closed
vladpazych opened this issue Dec 14, 2015 · 4 comments
Closed

[Question] Totally confused with GlobalZOrder #14675

vladpazych opened this issue Dec 14, 2015 · 4 comments

Comments

@vladpazych
Copy link

Hello.

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

I can't understand how to use setGlobalZOrder(), because this does nothing:

red.setGlobalZOrder(2);
green.setGlobalZOrder(3);
blue.setGlobalZOrder(1);
@zilongshanren
Copy link
Member

@vladpazych image broken?

@vladpazych
Copy link
Author

@zilongshanren weird, I saw it. Anyway - image is updated.

@madlexus
Copy link

The global z order is affecting only for Sprite objects.

@vladpazych
Copy link
Author

Ok, thank's. Make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants