forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainer.js
More file actions
31 lines (23 loc) · 842 Bytes
/
Copy pathContainer.js
File metadata and controls
31 lines (23 loc) · 842 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
/**
* @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 CONST = require('../../const');
var GameObject = require('../GameObject');
var ContainerWebGLRenderer = require('./ContainerWebGLRenderer');
var Children = require('../../components/Children');
var Container = function (state, parent, x, y)
{
GameObject.call(this, state, x, y, null, null, parent);
this.type = CONST.CONTAINER;
this.render = ContainerWebGLRenderer;
this.children = new Children(this);
};
Container.prototype = Object.create(GameObject.prototype);
Container.prototype.constructor = Container;
Container.prototype.preUpdate = function ()
{
this.children.preUpdate();
};
module.exports = Container;