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 ITilesetField Summary
Fields Modifier and Type Field Description static java.lang.StringFILE_EXTENSIONprotected TilesetsourceTilesetConstructor Summary
Method Summary
Modifier and Type Method Description booleancontainsTile(int tileId)booleancontainsTile(ITile tile)booleancontainsTile(ITilesetEntry entry)voidfinish(java.net.URL location)intgetColumns()intgetFirstGridId()Gets the first grid id.IMapImagegetImage()Gets the image.intgetMargin()Gets the margin.java.lang.StringgetName()Gets the name.java.util.Map<java.lang.String,ICustomProperty>getProperties()Returns aMapview of the custom properties for thisICustomPropertyProvider.intgetSpacing()Gets the spacing.SpritesheetgetSpritesheet()ITerrain[]getTerrain(int tileId)java.util.List<ITerrain>getTerrainTypes()ITilesetEntrygetTile(int id)intgetTileCount()java.awt.DimensiongetTileDimension()Gets the tile dimension.intgetTileHeight()Gets the tile height.ITileOffsetgetTileOffset()intgetTileWidth()Gets the tile width.booleanisExternal()voidload(java.util.List<Tileset> rawTilesets)voidsaveSource(java.lang.String basePath)voidsetName(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, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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, 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:ICustomPropertyProviderReturns aMapview of the custom properties for thisICustomPropertyProvider.- Specified by:
getPropertiesin interfaceICustomPropertyProvider- Overrides:
getPropertiesin classCustomPropertyProvider- Returns:
- a
Mapview of the custom properties for thisICustomPropertyProvider
getFirstGridId
public int getFirstGridId()Description copied from interface:ITilesetGets the first grid id.- Specified by:
getFirstGridIdin interfaceITileset- Returns:
- the first grid id
getImage
Description copied from interface:ITilesetGets the image.getMargin
public int getMargin()Gets the margin.getName
public java.lang.String getName()Description copied from interface:ResourceGets the name.setName
public void setName(java.lang.String name)getSpacing
public int getSpacing()Gets the spacing.- Specified by:
getSpacingin interfaceITileset- Returns:
- the spacing
getSpritesheet
- Specified by:
getSpritesheetin interfaceITileset
getTileDimension
public java.awt.Dimension getTileDimension()Description copied from interface:ITilesetGets the tile dimension.- Specified by:
getTileDimensionin interfaceITileset- Returns:
- the tile dimension
getTileHeight
public int getTileHeight()Gets the tile height.- Specified by:
getTileHeightin interfaceITileset- Returns:
- the tile height
getTileWidth
public int getTileWidth()Gets the tile width.- Specified by:
getTileWidthin interfaceITileset- Returns:
- the tile width
getTerrainTypes
- Specified by:
getTerrainTypesin interfaceITileset
getTerrain
- Specified by:
getTerrainin interfaceITileset
getColumns
public int getColumns()- Specified by:
getColumnsin interfaceITileset
getTileOffset
- Specified by:
getTileOffsetin interfaceITileset
getTileCount
public int getTileCount()- Specified by:
getTileCountin interfaceITileset
getTile
containsTile
- Specified by:
containsTilein interfaceITileset
containsTile
public boolean containsTile(int tileId)- Specified by:
containsTilein interfaceITileset
containsTile
- Specified by:
containsTilein interfaceITileset
finish
- Throws:
TmxException
saveSource
public void saveSource(java.lang.String basePath)isExternal
public boolean isExternal()load
