mirror of
https://github.com/photonstorm/phaser
synced 2024-12-19 01:24:48 +00:00
37 lines
893 B
JavaScript
37 lines
893 B
JavaScript
|
/**
|
||
|
* @author Richard Davey <rich@photonstorm.com>
|
||
|
* @copyright 2016 Photon Storm Ltd.
|
||
|
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* The GameObject Factory is a quick way to create many common game objects. The Factory is owned by the State.
|
||
|
*
|
||
|
* @class Phaser.GameObject.Factory
|
||
|
* @constructor
|
||
|
* @param {Phaser.Game} game - A reference to the currently running game.
|
||
|
*/
|
||
|
|
||
|
var GameObjectFactory = function (state)
|
||
|
{
|
||
|
/**
|
||
|
* @property {Phaser.Game} game - A reference to the currently running Game.
|
||
|
* @protected
|
||
|
*/
|
||
|
this.game = state.game;
|
||
|
|
||
|
/**
|
||
|
* @property {Phaser.State} state - The State that owns this Factory
|
||
|
* @protected
|
||
|
*/
|
||
|
this.state = state;
|
||
|
};
|
||
|
|
||
|
GameObjectFactory.prototype.constructor = GameObjectFactory;
|
||
|
|
||
|
GameObjectFactory.prototype = {
|
||
|
|
||
|
};
|
||
|
|
||
|
module.exports = GameObjectFactory;
|