Fixing loading of tilesets with margin or padding

This commit is contained in:
David Négrier 2020-07-05 17:10:08 +02:00
parent 2b5d3e0017
commit 67e07c04f8

View File

@ -247,7 +247,7 @@ export class GameScene extends Phaser.Scene {
//initalise map //initalise map
this.Map = this.add.tilemap(this.MapKey); this.Map = this.add.tilemap(this.MapKey);
this.mapFile.tilesets.forEach((tileset: ITiledTileSet) => { this.mapFile.tilesets.forEach((tileset: ITiledTileSet) => {
this.Terrains.push(this.Map.addTilesetImage(tileset.name, tileset.name)); this.Terrains.push(this.Map.addTilesetImage(tileset.name, tileset.name, tileset.tilewidth, tileset.tileheight, tileset.margin, tileset.spacing/*, tileset.firstgid*/));
}); });
//permit to set bound collision //permit to set bound collision