Containers added themselves to States properly.

This commit is contained in:
photonstorm 2016-11-10 17:04:29 +00:00
parent d0eab7a4e7
commit fa3905c8c7
2 changed files with 4 additions and 4 deletions

View file

@ -3,9 +3,9 @@
* @copyright 2016 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
Phaser.GameObject.Container = function (game, parent, x, y, name)
Phaser.GameObject.Container = function (state, parent, x, y, name)
{
Phaser.GameObject.call(this, game, x, y, null, null, parent);
Phaser.GameObject.call(this, state, x, y, null, null, parent);
/**
* @property {number} type - The const type of this object.

View file

@ -8,10 +8,10 @@ Phaser.GameObject.Container.FACTORY_KEY = 'container';
Phaser.GameObject.Container.FACTORY_ADD = function (parent, x, y, name)
{
return parent.children.add(new Phaser.GameObject.Container(this.game, null, x, y, name));
return parent.children.add(new Phaser.GameObject.Container(this.state, null, x, y, name));
};
Phaser.GameObject.Container.FACTORY_MAKE = function (parent, x, y)
{
return new Phaser.GameObject.Container(this.game, parent, x, y);
return new Phaser.GameObject.Container(this.state, parent, x, y);
};