mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 09:03:29 +00:00
40 lines
808 B
JavaScript
40 lines
808 B
JavaScript
|
/**
|
||
|
* @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);
|
||
|
|
||
|
};
|