public class TiledMap extends TiledResource
A TiledMap represents an entire map made with Tiled. It corresponds to a <map> tag in a Tiled XML file.
Modifier and Type | Class and Description |
---|---|
static class |
TiledMap.Orientation
Represents an orientation that a Tiled map can have.
|
static class |
TiledMap.RenderOrder
Represents an order in which the tiles in a Tiled map's tile layers
can be rendered.
|
static class |
TiledMap.StaggerAxis
Represents an axis that can be staggered in a Tiled map with a
staggered or hexagonal orientation.
|
static class |
TiledMap.StaggerIndex
Represents a category of indices that can be shifted in a Tiled map
with a staggered or hexagonal orientation.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getBackgroundColor()
Returns this map's background color, or null if none was specified.
|
int |
getHeight()
Returns this map's height in tiles.
|
int |
getHexSideLength()
If this map has a hexagonal orientation, returns the width or height
(depending on the staggered axis, and in pixels) of each tile's edge.
|
java.util.List<TiledLayer> |
getNonGroupLayers()
Returns an unmodifiable List view of all of this map's layers that are
not group layers, sorted from back to front in terms of rendering order.
|
TiledMap.Orientation |
getOrientation()
Returns this map's orientation.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Returns an unmodifiable Map view of this map's custom properties.
|
java.lang.Object |
getProperty(java.lang.String name)
Returns the value of this map's custom property with the specified name,
or null if no such property was specified.
|
TiledMap.RenderOrder |
getRenderOrder()
Returns the order in which the tiles in this map's tile layers are
rendered.
|
TiledMap.StaggerAxis |
getStaggerAxis()
If this map has a staggered or hexagonal orientation, returns which axis
is staggered.
|
TiledMap.StaggerIndex |
getStaggerIndex()
If this map has a staggered or hexagonal orientation, returns whether the
even or odd indices along the staggered axis are shifted.
|
int |
getTileHeight()
Returns the height of one tile in this map.
|
java.util.List<TiledTileset> |
getTilesets()
Returns an unmodifiable List view of the tilesets included in this map,
whether they are embedded directly in the map file or referenced via a
link to a TSX file.
|
int |
getTileWidth()
Returns the width of one tile in this map.
|
java.util.List<TiledLayer> |
getTopLevelLayers()
Returns an unmodifiable List view of all of this map's layers that are
not descendants of group layers, sorted from back to front in terms of
rendering order.
|
int |
getWidth()
Returns this map's width in tiles.
|
getPath
public final TiledMap.Orientation getOrientation()
public final TiledMap.RenderOrder getRenderOrder()
public final int getWidth()
public final int getHeight()
public final int getTileWidth()
public final int getTileHeight()
public final int getHexSideLength()
public final TiledMap.StaggerAxis getStaggerAxis()
public final TiledMap.StaggerIndex getStaggerIndex()
public final java.awt.Color getBackgroundColor()
public final java.util.List<TiledTileset> getTilesets()
public final java.util.List<TiledLayer> getTopLevelLayers()
public final java.util.List<TiledLayer> getNonGroupLayers()
public final java.util.Map<java.lang.String,java.lang.Object> getProperties()
java.awt.Color
for a color, java.io.File
for a file, and TiledObject for an
object (unless the object property is unset, in which case the value is
null).public final java.lang.Object getProperty(java.lang.String name)
java.awt.Color
for a color, java.io.File
for a
file, and TiledObject for an object (unless the object property is unset,
in which case the value is null).name
- The name of the property whose value is to be returned