Using Multiple Layers From Tiled Into Phaser Game
I'm creating a game with the Phaser engine, and I'm currently using the application 'Tiled' to create a my own tilemap. The actual problem seems to be with having multiple layers
Solution 1:
I ran into a similar problem. You only need to create a variable for the first layer, the rest should not be variables.
this.map = this.add.tilemap('gameWorld');
this.map.addTilesetImage('gameworld', 'tiles');
this.Background = this.map.createLayer('Background');
this.Background.resizeWorld();
this.map.createLayer('WallBlocks');
this.map.createLayer('Grass');
this.map.createLayer('SpikeAnimation');
this.map.createLayer('DiamondAnimation');
this.map.createLayer('SlimeAnimation');
Post a Comment for "Using Multiple Layers From Tiled Into Phaser Game"