diff --git a/src/physics/p2/Body.js b/src/physics/p2/Body.js index 784af8d235..f97cfc6728 100644 --- a/src/physics/p2/Body.js +++ b/src/physics/p2/Body.js @@ -1748,6 +1748,7 @@ Object.defineProperty(Phaser.Physics.P2.Body.prototype, "debug", { /** * A Body can be set to collide against the World bounds automatically if this is set to true. Otherwise it will leave the World. * Note that this only applies if your World has bounds! The response to the collision should be managed via CollisionMaterials. +* * @name Phaser.Physics.P2.Body#collideWorldBounds * @property {boolean} collideWorldBounds - Should the Body collide with the World bounds? */ diff --git a/src/physics/p2/World.js b/src/physics/p2/World.js index 6ffc8693ed..52e4de8239 100644 --- a/src/physics/p2/World.js +++ b/src/physics/p2/World.js @@ -1446,7 +1446,6 @@ Phaser.Physics.P2.prototype = { { output.push(body); } - } return output; @@ -1471,7 +1470,7 @@ Phaser.Physics.P2.prototype = { map.layers[layer].bodies[i].destroy(); } - map.layers[layer].bodies.length = []; + map.layers[layer].bodies.length = 0; },