arcade/Emitter.js appears to need update for 1.2
I'm seeing errors in arcade/Emitter.js about lines like particle.body.checkCollision.none = true; where the error message is "Uncaught TypeError: Cannot read property 'checkCollision' of null ".
After a quick glance at the codebase, it seems like arcade/Emitter.js might need to be updated to set the newly created Sprite's physics system. The docs in src/gameobjects/Sprite.js say:
By default Sprites won't add themselves to any physics system and their physics body will be
null. To enable them for physics you need to callgame.physics.enable(sprite, system)wherespriteis the object andsystemis the Physics system you want to use to manage this body.
Is my assumption right? Since we're inside arcade/Emitter.js, should we just add a call after particle = new Phaser.Sprite(this.game, 0, 0, rndKey, rndFrame); that reads game.physics.enable(particle, Phaser.Physics.ARCADE)?
I've updated this to use the ArcadePhysics system for now, so all the examples are working again properly. I'd rather this than try to shoe-horn it into p2 at this late stage, especially when particles needs totally revamping anyway (which is on the roadmap).
Good call. I wasn't sure about if p2 is totally replacing ArcadePhysics or not.