xompl Posted May 13, 2014 Report 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.