toto88x Posted January 29, 2014 Share Posted January 29, 2014 Hello, Is there a simple way to iterate over all the elements of the game in my state (sprites, groups, labels)?Something like: game.all.forEachAlive(function(e){...}, this)? Bonus question: I have trouble making the yoyo() function work with a tween. Can someone show me a working example? Thanks! Link to comment Share on other sites More sharing options...
Alvin Posted January 29, 2014 Share Posted January 29, 2014 Hello,The World class, which can be accessed using game.world extends the Group class.You can see it as a global group coutaining everything, that you can iterate over using :game.world.forEach() ooflorent 1 Link to comment Share on other sites More sharing options...
Recommended Posts