Dakar Posted March 3, 2017 Share Posted March 3, 2017 Hello everybody! I try to create first game on Phaser and have small question: I create group of sprites, every sprite of them has my own property, for example sprite.myFunnyIndex I want to get sprite by the value of myFunnyIndex. I can create func like groupname.iterate (...), but i think may be Phaser have simple way to do this, for exaple groupname.getChildByProps(propsname, value)? Thanks) Link to comment Share on other sites More sharing options...
Dakar Posted March 3, 2017 Author Share Posted March 3, 2017 I understood. Iterate is the easiest way: var cell = cells.iterate ('myIndex', myIndex, Phaser.Group.RETURN_CHILD); Link to comment Share on other sites More sharing options...
Recommended Posts