Can I add an Actor to the back layer in Libgdx?

I am making a game in Libgdx and I have a little problem. I have several actors that are displayed dynamically on the screen. If there is a character with an image that appears after the first one, can I send it back so it doesn't cover the first one that is already on the screen?

Typically Libgdx adds each new actor higher in the hierarchy like a stack and brings everyone to the front.

+3


source to share


1 answer


Try using the following methods in your Actor class: toFront () , toBack () and setZIndex ()



+8


source







All Articles