public class TsxTilesetSource extends TilesetSource
TilesetSource loaded from a TSX file. Allows for sharing data
 across multiple TiledMap instances.| Constructor and Description | 
|---|
| TsxTilesetSource(com.badlogic.gdx.files.FileHandle tmxPath,
                java.lang.String tsxPath) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | containsProperty(java.lang.String propertyName)Returns if the tileset contains the specified property | 
| void | dispose() | 
| void | drawTile(Graphics g,
        int tileId,
        int firstGid,
        int renderX,
        int renderY)Draws a tile to the  Graphicscontext | 
| void | drawTileset(Graphics g,
           int renderX,
           int renderY)Draws the whole tileset to the  Graphicscontext | 
| com.badlogic.gdx.utils.Array<com.badlogic.gdx.assets.AssetDescriptor> | getDependencies(com.badlogic.gdx.files.FileHandle tmxPath)Returns the dependencies of this source | 
| int | getHeight()Returns the height of this tileset in pixels | 
| int | getHeightInTiles()Returns the height of this source in tiles | 
| java.lang.String | getInternalUuid()Returns a UUID generated by mini2Dx | 
| int | getMargin()Returns the margin at the borders of the tileset | 
| com.badlogic.gdx.utils.ObjectMap<java.lang.String,java.lang.String> | getProperties()Returns the properties  ObjectMapof thisTileset | 
| java.lang.String | getProperty(java.lang.String propertyName)Returns the value of a specified property | 
| int | getSpacing()Returns the internal spacing between each tile | 
| Tile | getTile(int tileId,
       int firstGid)Returns the  Tilefor a given tile id | 
| Tile | getTileByPosition(int x,
                 int y)Returns the  Tilefor a given x/y coordinate with the tileset
 source | 
| int | getTileHeight()Returns the height of each tile in pixels | 
| Sprite | getTileImage(int tileId)Returns the  Spritefor a given tile | 
| int | getTileWidth()Returns the width of each tile in pixels | 
| java.lang.String | getTsxPath() | 
| int | getWidth()Returns the width of this tileset in pixels | 
| int | getWidthInTiles()Returns the width of this source in tiles | 
| boolean | isTextureLoaded()Returns if the tileset texture image is loaded | 
| void | loadTexture(com.badlogic.gdx.assets.AssetManager assetManager,
           com.badlogic.gdx.files.FileHandle tmxPath)Loads the tileset's texture image | 
| void | loadTexture(com.badlogic.gdx.files.FileHandle tmxPath)Loads the tileset's texture image | 
| void | loadTexture(com.badlogic.gdx.graphics.g2d.TextureAtlas textureAtlas)Loads the texture from a  TextureAtlas | 
| void | setProperty(java.lang.String propertyName,
           java.lang.String value)Sets the value of a specified property | 
contains, equals, getTileId, getTileImage, getTileX, getTileYpublic TsxTilesetSource(com.badlogic.gdx.files.FileHandle tmxPath,
                        java.lang.String tsxPath)
public com.badlogic.gdx.utils.Array<com.badlogic.gdx.assets.AssetDescriptor> getDependencies(com.badlogic.gdx.files.FileHandle tmxPath)
TilesetSourcegetDependencies in class TilesetSourcetmxPath - The path of the TMX filepublic void loadTexture(com.badlogic.gdx.files.FileHandle tmxPath)
TilesetSourceloadTexture in class TilesetSourcetmxPath - The path of the TMX filepublic void loadTexture(com.badlogic.gdx.assets.AssetManager assetManager,
                        com.badlogic.gdx.files.FileHandle tmxPath)
TilesetSourceloadTexture in class TilesetSourceassetManager - The AssetManager to usetmxPath - The path of the TMX filepublic void loadTexture(com.badlogic.gdx.graphics.g2d.TextureAtlas textureAtlas)
TilesetSourceTextureAtlasloadTexture in class TilesetSourcetextureAtlas - The TextureAtlas to usepublic boolean isTextureLoaded()
TilesetSourceisTextureLoaded in class TilesetSourcepublic Sprite getTileImage(int tileId)
TilesetSourceSprite for a given tilegetTileImage in class TilesetSourcetileId - The tile id to retrieveSprite or null if that textures haven't been loadedpublic int getWidthInTiles()
TilesetSourcegetWidthInTiles in class TilesetSourcepublic int getHeightInTiles()
TilesetSourcegetHeightInTiles in class TilesetSourcepublic void drawTile(Graphics g, int tileId, int firstGid, int renderX, int renderY)
TilesetSourceGraphics contextdrawTile in class TilesetSourceg - The Graphics context available for renderingtileId - The tile id to renderfirstGid - The first gid of the parent tilesetrenderX - The X coordinate to render atrenderY - The Y coordinate to render atpublic void drawTileset(Graphics g, int renderX, int renderY)
TilesetSourceGraphics contextdrawTileset in class TilesetSourceg - The Graphics context available for renderingrenderX - The X coordinate to render atrenderY - The Y coordinate to render atpublic int getWidth()
TilesetSourcegetWidth in class TilesetSourcepublic int getHeight()
TilesetSourcegetHeight in class TilesetSourcepublic int getTileWidth()
TilesetSourcegetTileWidth in class TilesetSourcepublic int getTileHeight()
TilesetSourcegetTileHeight in class TilesetSourcepublic int getSpacing()
TilesetSourcegetSpacing in class TilesetSourcepublic int getMargin()
TilesetSourcegetMargin in class TilesetSourcepublic Tile getTileByPosition(int x, int y)
TilesetSourceTile for a given x/y coordinate with the tileset
 sourcegetTileByPosition in class TilesetSourcex - The x coordinate of the tile within the tileset (in tiles)y - The y coordinate of the tile within the tileset (in tiles)Tilepublic Tile getTile(int tileId, int firstGid)
TilesetSourceTile for a given tile idgetTile in class TilesetSourcetileId - The tile id to look upfirstGid - The first gid for the tilesetTilepublic boolean containsProperty(java.lang.String propertyName)
TilesetSourcecontainsProperty in class TilesetSourcepropertyName - The property name to search forpublic java.lang.String getProperty(java.lang.String propertyName)
TilesetSourcegetProperty in class TilesetSourcepropertyName - The property name to search forpublic void setProperty(java.lang.String propertyName,
                        java.lang.String value)
TilesetSourcesetProperty in class TilesetSourcepropertyName - The property name to set the value forvalue - The value of the property to setpublic com.badlogic.gdx.utils.ObjectMap<java.lang.String,java.lang.String> getProperties()
TilesetSourceObjectMap of this TilesetgetProperties in class TilesetSourcepublic java.lang.String getInternalUuid()
TilesetSourcegetInternalUuid in class TilesetSourcepublic java.lang.String getTsxPath()
public void dispose()