@@ -614,21 +614,23 @@ Phaser.Tilemap.prototype = {
614614 return ;
615615 }
616616
617- // create the internal layers for different tilesets using this one as a base description
617+ // Create the internal layers for different tilesets using this one as a base description
618618 for ( var i = 1 , l = this . tilesets . length ; i < l ; i ++ )
619619 {
620620 var ts = this . tilesets [ i ] ;
621621 var li = this . layers [ index ] ;
622- this . createInternalLayer ( "_internal" + i . toString ( ) , ts , li . width , li . height , ts . tileWidth , ts . tileHeight , group ) ;
622+ this . createInternalLayer ( "_internal" + i . toString ( ) , ts , li . width , li . height , ts . tileWidth , ts . tileHeight , group ) ;
623623 }
624624
625- if ( this . game . renderType === Phaser . WEBGL )
625+ if ( this . game . renderType === Phaser . WEBGL )
626626 {
627627 // use WebGL variant of TilemapLayer
628628 return group . add ( new Phaser . TilemapLayerGL ( this . game , this , index , width , height ) ) ;
629629 }
630-
631- return group . add ( new Phaser . TilemapLayer ( this . game , this , index , width , height ) ) ;
630+ else
631+ {
632+ return group . add ( new Phaser . TilemapLayer ( this . game , this , index , width , height ) ) ;
633+ }
632634
633635 } ,
634636
@@ -660,7 +662,7 @@ Phaser.Tilemap.prototype = {
660662
661663 if ( this . getLayerIndex ( name ) !== null )
662664 {
663- console . warn ( 'Tilemap.createBlankLayer : Layer with matching name already exists' ) ;
665+ console . warn ( 'Tilemap.createInternalLayer : Layer with matching name already exists: ' + name ) ;
664666 return ;
665667 }
666668
@@ -765,7 +767,7 @@ Phaser.Tilemap.prototype = {
765767
766768 if ( this . getLayerIndex ( name ) !== null )
767769 {
768- console . warn ( 'Tilemap.createBlankLayer: Layer with matching name already exists' ) ;
770+ console . warn ( 'Tilemap.createBlankLayer: Layer with matching name already exists: ' + name ) ;
769771 return ;
770772 }
771773
0 commit comments