The Advanced Game Developer's Toolkit by Rex van der Spuy

The Advanced Game Developer's Toolkit by Rex van der Spuy

Author:Rex van der Spuy
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


//Figure out how many columns there are on the tileset.

//This is the width of the image, divided by the width

//of each tile, plus any optional spacing thats around each tile

let numberOfTilesetColumns =

Math.floor(

tiledMap.tilesets[0].imagewidth / (tiledMap.tilewidth + spacing)

);

//E. A `z` property to help track which depth level the sprites are on

let z = 0;

//Loop through all the map layers

tiledMap.layers.forEach(tiledLayer => {

//Make a group for this layer and copy

//all of the layer properties onto it

let layerGroup = new PIXI.Container();



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.