The physics config object is now stored locally in World.config.

This commit is contained in:
photonstorm 2014-09-09 12:49:31 +01:00
parent 3fc527ba53
commit 5eedc4c2c5

View file

@ -27,11 +27,17 @@ Phaser.Physics.P2 = function (game, config) {
config = { gravity: [0, 0], broadphase: new p2.SAPBroadphase() };
}
/**
* @property {object} config - The p2 World configuration object.
* @protected
*/
this.config = config;
/**
* @property {p2.World} world - The p2 World in which the simulation is run.
* @protected
*/
this.world = new p2.World(config);
this.world = new p2.World(this.config);
/**
* @property {number} frameRate - The frame rate the world will be stepped at. Defaults to 1 / 60, but you can change here. Also see useElapsedTime property.