P2 bounds now collides with everything by default

This commit is contained in:
Charles Black 2014-07-27 16:06:55 -04:00
parent 74b1189890
commit a90ab2e59b
3 changed files with 6 additions and 2 deletions

View file

@ -153,8 +153,6 @@ Phaser.Physics.prototype = {
throw new Error('The Chipmunk physics system has not been implemented yet.');
}
this.setBoundsToWorld();
},
/**

View file

@ -146,6 +146,9 @@ Phaser.Physics.Arcade = function (game) {
*/
this._dy = 0;
// By default we want the bounds the same size as the world bounds
this.setBoundsToWorld();
};
Phaser.Physics.Arcade.prototype.constructor = Phaser.Physics.Arcade;

View file

@ -64,6 +64,9 @@ Phaser.Physics.Ninja = function (game) {
*/
this.quadTree = new Phaser.QuadTree(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels);
// By default we want the bounds the same size as the world bounds
this.setBoundsToWorld();
};
Phaser.Physics.Ninja.prototype.constructor = Phaser.Physics.Ninja;