-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Actor z-index throws an error if set on a child actor or on an Actor not part of a scene #888
Labels
bug
This issue describes undesirable, incorrect, or unexpected behavior
Milestone
Comments
eonarheim
added
the
bug
This issue describes undesirable, incorrect, or unexpected behavior
label
Sep 27, 2017
eonarheim
changed the title
Actor z-index throws an error if set on a child actor
Actor z-index throws an error if set on a child actor or on an Actor not part of a scene
Feb 12, 2018
This also happens if the actor is not part of scene when you set the z-index |
This was referenced Sep 30, 2020
eonarheim
added a commit
that referenced
this issue
Oct 4, 2020
eonarheim
added a commit
that referenced
this issue
Nov 5, 2020
This change comes with a lot of advantages, everything including TileMaps can make use of z-indexing, anything with a pos, rotation, scale, and draw() method can be drawn. Related #1361 Closes #1018 #888 Docs PR: excaliburjs/excaliburjs.github.io#57 ## Changes: - Moves existing drawing functionality to ECS - Updates to ECS implementation to facilitate Excalibur integration
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue was brought up on the forum by Maxime, https://groups.google.com/forum/#!topic/excaliburjs/NPdFFSPDdwE
This may take some work to fix, probably by generalizing draw code from scene and extracting them into a separate class that can be used both by scenes, child actors, and any other actor based data structrue meant for drawing.
Steps to Reproduce
Repro codepen https://codepen.io/anon/pen/YrVwOe?editors=0010#0
Setting the z-index on a child actor does not work because the scene drawTree relies on a scene to order drawing, but child actors do not have a scene they are a member of.
Excalibur Actor.ts line 620
Expected Result
Excalibur should allow z-index operations in child actors
Actual Result
Errors are thrown and the game does not load.
Environment
The text was updated successfully, but these errors were encountered: