Merge pull request #217 from thecodingmachine/webpackprod

Fixing loading of tilesets with margin or padding
This commit is contained in:
David Négrier 2020-07-05 17:12:49 +02:00 committed by GitHub
commit b01958107b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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