Merge pull request #954 from Phaiax/issue953-bodydebug

inverting debug getter result
This commit is contained in:
Richard Davey 2014-07-01 15:35:35 +01:00
commit 1a0ebe6d26

View file

@ -1112,7 +1112,7 @@ Phaser.Physics.P2.Body.prototype = {
{
var fixtureData = data[i];
var shapesOfFixture = this.addFixture(fixtureData);
// Always add to a group
createdFixtures[fixtureData.filter.group] = createdFixtures[fixtureData.filter.group] || [];
createdFixtures[fixtureData.filter.group] = createdFixtures[fixtureData.filter.group].concat(shapesOfFixture);
@ -1725,7 +1725,7 @@ Object.defineProperty(Phaser.Physics.P2.Body.prototype, "debug", {
get: function () {
return (!this.debugBody);
return (this.debugBody !== null);
},
@ -1749,7 +1749,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?
*/