forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameObjectCreator.js
More file actions
36 lines (27 loc) · 870 Bytes
/
Copy pathGameObjectCreator.js
File metadata and controls
36 lines (27 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2016 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var FactoryContainer = require('../../gameobjects/FactoryContainer');
/**
* 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 GameObjectCreator = function (state)
{
this.state = state;
this.children = state.sys.children;
FactoryContainer.load(this, false);
};
GameObjectCreator.prototype.constructor = GameObjectCreator;
GameObjectCreator.prototype = {
destroy: function ()
{
this.state = undefined;
}
};
module.exports = GameObjectCreator;