donpink Posted June 2, 2015 Share Posted June 2, 2015 Hello,How can I use the ID of a block in a if ? if (this.body.blockedDown && On the block number 42) Link to comment Share on other sites More sharing options...
Skeptron Posted June 3, 2015 Share Posted June 3, 2015 Phaser objects are Javascript objects, so you can add any field you like to it. You can set this.body.uniqueId = 10 and then later on test that field. Just be careful not to overwrite / set a field that already exists. To quickly know all the fields / methods of an object, just log it into the console : console.log(this). Link to comment Share on other sites More sharing options...
Recommended Posts