MadMonkey119 Posted April 21, 2014 Share Posted April 21, 2014 Hi, I introduced myself to Phaser yesterday and have been having fun learning and playing with it. I am currently drawing a rectangle to use for a game's background. To draw it I first create the rectangle new Phaser.Rectangle(0, 0, 480, 0)then use game.debug.geom()I want to now display a sprite above the rectangle background but I can't find a way to influence the order in which they are drawn. Thank you very much! Link to comment Share on other sites More sharing options...
MadMonkey119 Posted April 21, 2014 Author Share Posted April 21, 2014 I have solved my own problem by using graphics rather than drawing debug geometry. Graphics can be used to draw rectangles, circles, etc so it was a much better implementation than debug geometry. By callinggraphics = game.add.graphics(0, 0);before adding my sprites to the screen it draws the graphics below the sprites. Link to comment Share on other sites More sharing options...
eugenioclrc Posted May 2, 2014 Share Posted May 2, 2014 Have you manage to add physics to the the graphic? is ti possible? Link to comment Share on other sites More sharing options...
Recommended Posts