mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Containers added themselves to States properly.
This commit is contained in:
parent
d0eab7a4e7
commit
fa3905c8c7
2 changed files with 4 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue