phaser/src/physics/World.js

40 lines
808 B
JavaScript
Raw Normal View History

2014-02-10 16:01:30 +00:00
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @class Phaser.Physics
*/
Phaser.Physics = {};
/**
* @class Phaser.Physics.World
* @classdesc Physics World Constructor
* @constructor
* @param {Phaser.Game}
*/
Phaser.Physics.World = function (game) {
/**
* @property {Phaser.Game} game - Local reference to game.
*/
this.game = game;
p2.World.call(this);
};
Phaser.Physics.World.prototype = Object.create(p2.World.prototype);
Phaser.Physics.World.prototype.constructor = Phaser.Physics.World;
/**
* @method Phaser.Physics.World.prototype.update
*/
Phaser.Physics.World.prototype.update = function () {
this.step(1 / 60);
};