kozy Posted April 28, 2015 Share Posted April 28, 2015 I'm trying to figure out how to get json layer data from the phaser cache.. I'm using game.cache._json but this just seems to return functions? I'm trying to get tile data so I can create 2d array of tile types (e.g. 0,0,8,5) each value representing a tile from the tilemap. I'll then use this with A* for pathfinding. Any help would be appreciated!-Rich Link to comment Share on other sites More sharing options...
kozy Posted April 28, 2015 Author Share Posted April 28, 2015 answered my own question:theWorld = game.cache.getTilemapData('desert').data.layers[0].data; Link to comment Share on other sites More sharing options...
Recommended Posts