List of usage examples for com.badlogic.gdx.graphics.g2d.tiled SimpleTileAtlas SimpleTileAtlas
public SimpleTileAtlas(TiledMap map, FileHandle inputDir)
From source file:com.baldwin.libgdx.commons.SimpleTiledMapHelper.java
License:Apache License
/** * Loads the requested tmx map file in to the helper. * /*from w w w. j ava 2 s . c o m*/ * @param tmxFile */ public void loadMap(String tmxFile) { if (resourceDirectory == null) { throw new IllegalStateException("loadMap() called out of sequence"); } map = TiledLoader.createMap(Gdx.files.internal(tmxFile)); tileAtlas = new SimpleTileAtlas(map, resourceDirectory); tileMapRenderer = new TileMapRenderer(map, tileAtlas, 16, 16); }