workadventure/maps/tests/LoadTileset/scriptTileset.js
GRL 73d589ad11 Load a json file that describe a tileset in Tile format.
Then add it to the tilemap of the GameScene
Then add if to the GameMap
2021-07-28 18:03:19 +02:00

6 lines
204 B
JavaScript

WA.room.loadTileset("http://maps.workadventure.localhost/tests/LoadTileset/Yellow.json").then((firstgid) => {
WA.room.setTiles([
{x: 5, y: 5, tile: firstgid + 1, layer: 'bottom'},
]);
});