xompl Posted May 13, 2014 Share Posted May 13, 2014 Not sure if this is intended so I write here instead of in github. If I create a new layer with this.layer = this.map.createLayer('layer'); the new layer is shown on screen but subsequent calls to functions likethis.map.replace(a, without indicating explicitly the layer do not work on the layer that is being displayed on screen. I need to create the layer and also set it to make .replace work. this.layer = this.map.createLayer('layer'); this.layerName = this.map.getLayer('layer'); this.map.setLayer(this.layerName); It works for the first layer created (currentLayer's default value is 0) but I don't see where currentLayer is updated after creating a new Lawyer. I'm talking about http://docs.phaser.io/Tilemap.js.html function createLayer (line 410 at this moment). Is this the correct behaviour? Link to comment Share on other sites More sharing options...
Recommended Posts