|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.graphics.g2d.tiled.TileAtlas
public class TileAtlas
Contains an atlas of tiles by tile id for use with TileMapRenderer
Field Summary | |
---|---|
protected IntMap<TextureRegion> |
regionsMap
|
protected java.util.HashSet<Texture> |
textures
|
Constructor Summary | |
---|---|
protected |
TileAtlas()
Protected constructor to allow different implementations |
|
TileAtlas(TiledMap map,
FileHandle inputDir)
Creates a TileAtlas for use with TileMapRenderer . |
Method Summary | |
---|---|
void |
dispose()
Releases all resources associated with this TileAtlas instance. |
void |
flipRegions(boolean x,
boolean y)
Flips all regions in the atlas on the specified axis. |
TextureRegion |
getRegion(int id)
Gets an TextureRegion for a tile id |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IntMap<TextureRegion> regionsMap
protected final java.util.HashSet<Texture> textures
Constructor Detail |
---|
protected TileAtlas()
public TileAtlas(TiledMap map, FileHandle inputDir)
TileMapRenderer
. Run the map through TiledMapPacker to create the files required.
map
- The tiled mapinputDir
- The directory containing all the files created by TiledMapPackerMethod Detail |
---|
public TextureRegion getRegion(int id)
TextureRegion
for a tile id
id
- tile id
TextureRegion
public void dispose()
dispose
in interface Disposable
public void flipRegions(boolean x, boolean y)
x
- - if true
region is flipped on the x axisy
- - if true
region is flipped on the y axis
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |