Class TmxMap
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.TmxMap
- All Implemented Interfaces:
ICustomPropertyProvider,ILayerList,IMap,Comparable<IMap>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds anILayerto the Layer list at the given index.voidAdds anILayerto the Layer list.booleanvoidprotected intprotected intGets theIGroupLayers contained in a Layer list.intGets the map height in tiles.intGets the straight edges' length for hexagonal maps.Gets theIImageLayers contained in a Layer list.Gets all MapObjectLayers in the Layer list.getName()intintGets the next object id.Gets the orientation.getPath()Gets all render layers in the Layer list.Gets the renderorder.Gets the size in pixels.Gets the sizein tiles.Gets the staggering axisGets the tile size.intGets the vertical tile size.Gets theITileLayers contained in a Layer list.getTilesetEntry(int gid) Gets the tilesets.Gets the tile size.intGets the horizontal tile size.doubleGets the version.intgetWidth()Gets the map width in tiles.inthashCode()booleanvoidremoveLayer(int index) Removes a layer from the Layer list.voidremoveLayer(ILayer layer) Removes anILayerfrom the Layer list.voidsetHeight(int height) voidsetHexSideLength(int hexSideLength) voidSets the name.voidsetOrientation(IMapOrientation orientation) voidvoidsetRenderOrder(RenderOrder renderorder) voidsetStaggerAxis(StaggerAxis staggerAxis) voidsetStaggerIndex(StaggerIndex staggerIndex) voidsetTiledVersion(String tiledversion) voidsetTileHeight(int tileheight) voidsetTileWidth(int tilewidth) voidsetVersion(double version) voidsetWidth(int width) toString()Methods inherited from class de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.ICustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueMethods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.ILayerList
getMapObject, getMapObjectLayer, getMapObjectLayer, getMapObjectLayer, getMapObjects, getMapObjects, getMapObjects, removeMapObject
-
Field Details
-
FILE_EXTENSION
- See Also:
-
MAX_MAJOR
public static final int MAX_MAJOR- See Also:
-
MAX_MINOR
public static final int MAX_MINOR- See Also:
-
-
Constructor Details
-
TmxMap
public TmxMap() -
TmxMap
-
-
Method Details
-
getImageLayers
Description copied from interface:ILayerListGets theIImageLayers contained in a Layer list.- Specified by:
getImageLayersin interfaceILayerList- Returns:
- a
Listof allIImageLayers
-
getNextObjectId
public int getNextObjectId()Gets the next object id.- Specified by:
getNextObjectIdin interfaceIMap- Returns:
- the next object id
-
getNextLayerId
public int getNextLayerId()- Specified by:
getNextLayerIdin interfaceIMap
-
getOrientation
Description copied from interface:IMapGets the orientation.- Specified by:
getOrientationin interfaceIMap- Returns:
- the orientation
-
setOrientation
-
getPath
-
setPath
-
getRenderOrder
Description copied from interface:IMapGets the renderorder.- Specified by:
getRenderOrderin interfaceIMap- Returns:
- the renderorder
-
setRenderOrder
-
getMapObjectLayers
Description copied from interface:ILayerListGets all MapObjectLayers in the Layer list.- Specified by:
getMapObjectLayersin interfaceILayerList- Returns:
- a List of IMapObjectLayers
-
getSizeInPixels
Description copied from interface:IMapGets the size in pixels.- Specified by:
getSizeInPixelsin interfaceIMap- Returns:
- the size in pixels
-
getBounds
-
getSizeInTiles
Description copied from interface:IMapGets the sizein tiles.- Specified by:
getSizeInTilesin interfaceIMap- Returns:
- the sizein tiles
-
getTileLayers
Description copied from interface:ILayerListGets theITileLayers contained in a Layer list.- Specified by:
getTileLayersin interfaceILayerList- Returns:
- a
Listof allITileLayers
-
getTilesets
Description copied from interface:IMapGets the tilesets.- Specified by:
getTilesetsin interfaceIMap- Returns:
- the tilesets
-
getTilesetEntry
- Specified by:
getTilesetEntryin interfaceIMap
-
getTileSize
Description copied from interface:IMapGets the tile size.- Specified by:
getTileSizein interfaceIMap- Returns:
- the tile size
-
getTileWidth
public int getTileWidth()Description copied from interface:IMapGets the horizontal tile size.- Specified by:
getTileWidthin interfaceIMap- Returns:
- the horizontal tile size
-
setTileWidth
public void setTileWidth(int tilewidth) -
getTileHeight
public int getTileHeight()Description copied from interface:IMapGets the vertical tile size.- Specified by:
getTileHeightin interfaceIMap- Returns:
- the vertical tile size
-
setTileHeight
public void setTileHeight(int tileheight) -
getVersion
public double getVersion()Description copied from interface:IMapGets the version.- Specified by:
getVersionin interfaceIMap- Returns:
- the version
-
setVersion
public void setVersion(double version) -
getTiledVersion
- Specified by:
getTiledVersionin interfaceIMap
-
setTiledVersion
-
getGroupLayers
Description copied from interface:ILayerListGets theIGroupLayers contained in a Layer list.- Specified by:
getGroupLayersin interfaceILayerList- Returns:
- a
Listof allIGroupLayers
-
getName
-
setName
Description copied from interface:IMapSets the name. -
getWidth
public int getWidth()Description copied from interface:IMapGets the map width in tiles. -
setWidth
public void setWidth(int width) -
getHeight
public int getHeight()Description copied from interface:IMapGets the map height in tiles. -
setHeight
public void setHeight(int height) -
getHexSideLength
public int getHexSideLength()Description copied from interface:IMapGets the straight edges' length for hexagonal maps.- Specified by:
getHexSideLengthin interfaceIMap- Returns:
- the hex side length
-
setHexSideLength
public void setHexSideLength(int hexSideLength) -
getStaggerAxis
Description copied from interface:IMapGets the staggering axis- Specified by:
getStaggerAxisin interfaceIMap- Returns:
- the tile size
-
setStaggerAxis
-
getStaggerIndex
Description copied from interface:IMapGets the tile size.- Specified by:
getStaggerIndexin interfaceIMap- Returns:
- the tile size
-
setStaggerIndex
-
finish
- Throws:
TmxException
-
addLayer
Description copied from interface:ILayerListAdds anILayerto the Layer list.- Specified by:
addLayerin interfaceILayerList- Parameters:
layer- the layer to be added
-
addLayer
Description copied from interface:ILayerListAdds anILayerto the Layer list at the given index.- Specified by:
addLayerin interfaceILayerList- Parameters:
index- the indexlayer- the layer to be added
-
removeLayer
Description copied from interface:ILayerListRemoves anILayerfrom the Layer list.- Specified by:
removeLayerin interfaceILayerList- Parameters:
layer- the layer to be removed
-
removeLayer
public void removeLayer(int index) Description copied from interface:ILayerListRemoves a layer from the Layer list.- Specified by:
removeLayerin interfaceILayerList- Parameters:
index- the index of the layer to be removed
-
toString
-
equals
-
hashCode
public int hashCode() -
getRenderLayers
Description copied from interface:ILayerListGets all render layers in the Layer list.- Specified by:
getRenderLayersin interfaceILayerList- Returns:
- a List of ILayers
-
getExternalTilesets
-
getBackgroundColor
- Specified by:
getBackgroundColorin interfaceIMap
-
isInfinite
public boolean isInfinite()- Specified by:
isInfinitein interfaceIMap
-
getChunkOffsetX
protected int getChunkOffsetX() -
getChunkOffsetY
protected int getChunkOffsetY()
-