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
40 lines (30 loc) · 798 Bytes
/
Copy pathGameObjectCreator.js
File metadata and controls
40 lines (30 loc) · 798 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
37
38
39
40
var Class = require('../../utils/Class');
var GameObjectCreator = new Class({
initialize:
function GameObjectCreator (scene)
{
this.scene = scene;
this.displayList;
this.updateList;
},
boot: function (sys)
{
this.displayList = sys.displayList;
this.updateList = sys.updateList;
},
destroy: function ()
{
this.scene = null;
this.displayList = null;
this.updateList = null;
}
});
// Static method called directly by the Game Object creator functions
GameObjectCreator.register = function (type, factoryFunction)
{
if (!GameObjectCreator.prototype.hasOwnProperty(type))
{
GameObjectCreator.prototype[type] = factoryFunction;
}
};
module.exports = GameObjectCreator;