1- /**
2- * @author Richard Davey <rich@photonstorm.com>
3- * @copyright 2016 Photon Storm Ltd.
4- * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License }
5- */
61
72var Image = require ( './Image' ) ;
83var FactoryContainer = require ( '../../gameobjects/FactoryContainer' ) ;
@@ -27,20 +22,15 @@ var ImageFactory = {
2722 * @param {Phaser.Group } [group] - Optional Group to add the object to. If not specified it will be added to the World group.
2823 * @return {Phaser.Image } The newly created Image object.
2924 */
30- add : function ( x , y , key , frame , group )
25+ add : function ( x , y , key , frame , parent )
3126 {
32- if ( group === undefined ) { group = this . state ; }
27+ if ( parent === undefined ) { parent = this . state ; }
3328
34- // console.log('ImageFactory.add', key);
35- // console.log('into State', this.state.sys.settings.key);
36-
37- return group . children . add ( new Image ( this . state , x , y , key , frame ) ) ;
29+ return parent . children . add ( new Image ( this . state , x , y , key , frame ) ) ;
3830 } ,
3931
4032 make : function ( x , y , key , frame )
4133 {
42- // console.log('ImageFactory.make', key, x, y, frame);
43-
4434 return new Image ( this . state , x , y , key , frame ) ;
4535 }
4636
0 commit comments