Class Tileset
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.Tileset
- All Implemented Interfaces:
ICustomPropertyProvider
,ITileset
,Resource
,java.lang.Comparable<Resource>
public class Tileset
extends CustomPropertyProvider
implements ITileset
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FILE_EXTENSION
protected Tileset
sourceTileset
Constructor Summary
Method Summary
Modifier and Type Method Description boolean
containsTile(int tileId)
boolean
containsTile(ITile tile)
boolean
containsTile(ITilesetEntry entry)
void
finish(java.net.URL location)
int
getColumns()
int
getFirstGridId()
Gets the first grid id.IMapImage
getImage()
Gets the image.int
getMargin()
Gets the margin.java.lang.String
getName()
Gets the name.java.util.Map<java.lang.String,ICustomProperty>
getProperties()
Returns aMap
view of the custom properties for thisICustomPropertyProvider
.int
getSpacing()
Gets the spacing.Spritesheet
getSpritesheet()
ITerrain[]
getTerrain(int tileId)
java.util.List<ITerrain>
getTerrainTypes()
ITilesetEntry
getTile(int id)
int
getTileCount()
java.awt.Dimension
getTileDimension()
Gets the tile dimension.int
getTileHeight()
Gets the tile height.ITileOffset
getTileOffset()
int
getTileWidth()
Gets the tile width.boolean
isExternal()
void
load(java.util.List<Tileset> rawTilesets)
void
saveSource(java.lang.String basePath)
void
setName(java.lang.String name)
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, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
Field Details
FILE_EXTENSION
public static final java.lang.String FILE_EXTENSION- See Also:
- Constant Field Values
sourceTileset
Constructor Details
Method Details
getProperties
Description copied from interface:ICustomPropertyProvider
Returns aMap
view of the custom properties for thisICustomPropertyProvider
.- Specified by:
getProperties
in interfaceICustomPropertyProvider
- Overrides:
getProperties
in classCustomPropertyProvider
- Returns:
- a
Map
view of the custom properties for thisICustomPropertyProvider
getFirstGridId
public int getFirstGridId()Description copied from interface:ITileset
Gets the first grid id.- Specified by:
getFirstGridId
in interfaceITileset
- Returns:
- the first grid id
getImage
Description copied from interface:ITileset
Gets the image.getMargin
public int getMargin()Gets the margin.getName
public java.lang.String getName()Description copied from interface:Resource
Gets the name.setName
public void setName(java.lang.String name)getSpacing
public int getSpacing()Gets the spacing.- Specified by:
getSpacing
in interfaceITileset
- Returns:
- the spacing
getSpritesheet
- Specified by:
getSpritesheet
in interfaceITileset
getTileDimension
public java.awt.Dimension getTileDimension()Description copied from interface:ITileset
Gets the tile dimension.- Specified by:
getTileDimension
in interfaceITileset
- Returns:
- the tile dimension
getTileHeight
public int getTileHeight()Gets the tile height.- Specified by:
getTileHeight
in interfaceITileset
- Returns:
- the tile height
getTileWidth
public int getTileWidth()Gets the tile width.- Specified by:
getTileWidth
in interfaceITileset
- Returns:
- the tile width
getTerrainTypes
- Specified by:
getTerrainTypes
in interfaceITileset
getTerrain
- Specified by:
getTerrain
in interfaceITileset
getColumns
public int getColumns()- Specified by:
getColumns
in interfaceITileset
getTileOffset
- Specified by:
getTileOffset
in interfaceITileset
getTileCount
public int getTileCount()- Specified by:
getTileCount
in interfaceITileset
getTile
containsTile
- Specified by:
containsTile
in interfaceITileset
containsTile
public boolean containsTile(int tileId)- Specified by:
containsTile
in interfaceITileset
containsTile
- Specified by:
containsTile
in interfaceITileset
finish
- Throws:
TmxException
saveSource
public void saveSource(java.lang.String basePath)isExternal
public boolean isExternal()load