public class TiledMap extends TiledResource implements TiledCustomizable
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 |
---|---|
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.
|
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.
|
Map<String,Object> |
getProperties()
Returns an unmodifiable Map view of this entity's custom properties.
|
Object |
getProperty(String name)
Returns the value of this entity'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.
|
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.
|
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, getReader
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 Color getBackgroundColor()
public final List<TiledTileset> getTilesets()
public final List<TiledLayer> getTopLevelLayers()
public final List<TiledLayer> getNonGroupLayers()
public final Map<String,Object> getProperties()
TiledCustomizable
java.awt.Color
for a color, TiledFile for a file, and TiledObject for an object (unless
the object property is unset, in which case the value is null).getProperties
in interface TiledCustomizable
public final Object getProperty(String name)
TiledCustomizable
java.awt.Color
for a color, TiledFile for a file, and
TiledObject for an object (unless the object property is unset, in which
case the value is null).getProperty
in interface TiledCustomizable
name
- The name of the property whose value is to be returnedCopyright © 2020. All rights reserved.