Jump to content

pop sprite to top


InsaneHero
 Share

Recommended Posts

I would like to pop a sprite to the top of the drawing stack (I'm create a new level but want to hold onto the existing player instance which will eventually animate during the level transition effect, currently the 2nd level is drawing over the player).

 

As far as I can tell renderOrderID dictates the drawing order... but I hacked in something which sets player.renderOrderID to game.world.currentRenderOrderID++ and that's not doing it.

 

Does anyone have a good solution (while I dig through the source some more)?

 

Link to comment
Share on other sites

Ah found it.  It is of course a Pixi wrapper... player.bringToTop()

And now I know a whole lot more about the Phaser/Pixi interface :)

EDIT: I want to mark this thread solved but that involves me marking my answer to my own question as the 'best' answer... is that bad etiquette on this forum?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...