Youle Posted February 26, 2014 Share Posted February 26, 2014 Hi,I'm creating a Tower Defense prototype using a class I created as towers (itself based on two Phaser.Rectangle with one darker to create some volume).I'd like to sort these towers by y axis. I have to create them on a group and... I can't find how to create something else than spritesheets on Phaser.Group. myGroup.length show '2' (I created 2 towers for the examples) but they don't display on game container. Have you an idea ? Thank you, Youle Link to comment Share on other sites More sharing options...
Youle Posted February 26, 2014 Author Share Posted February 26, 2014 It's ok, I made my own sort loop and abandoned Phaser.Group way. Link to comment Share on other sites More sharing options...
jflowers45 Posted February 26, 2014 Share Posted February 26, 2014 Glad you worked out a solution, for future reference have you looked at the documenations for group.add, I'm still not totally sure what your problem was but maybe this will help "Adds an existing object to this Group. The object can be an instance of Phaser.Sprite, Phaser.Button or any other display object. The child is automatically added to the top of the Group, so renders on-top of everything else within the Group. If you need to control that then see the addAt method" http://gametest.mobi/phaser/docs/Phaser.Group.html#toc24 Youle 1 Link to comment Share on other sites More sharing options...
Youle Posted March 14, 2014 Author Share Posted March 14, 2014 Thank you jf (may I call you jf),I had read it, I'll try today a secondary prototype to test it again because as I'm coding the game, I need it more and more, I'll post the result if I find it Link to comment Share on other sites More sharing options...
Recommended Posts