Interface ITileset
- All Superinterfaces:
Comparable<Resource>, ICustomPropertyProvider, Resource
- All Known Implementing Classes:
Tileset
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsTile(int tileId) Returns whether this tileset contains a tile with the supplied global id.booleancontainsTile(ITile tile) Returns whether this tileset contains the supplied tile.booleancontainsTile(ITilesetEntry entry) Returns whether this tileset contains the supplied tileset entry.intGets the number of tile columns in the tileset.intGets the first grid id.getImage()Gets the image.intGets the margin (in pixels) between the tileset image edge and the first tile.intGets the spacing (in pixels) between adjacent tiles in the tileset image.Gets the spritesheet that contains the rendered tile images.Gets the terrain sets defined by this tile set.getTile(int id) Gets the tileset entry with the given local id.intGets the total number of tiles defined by this tileset.Gets the tile dimension.intGets the tile height in pixels.Gets the per-tileset rendering offset.intGets the tile width.Methods inherited from interface ICustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getCharValue, getCharValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getMapObjectId, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, hasCustomProperty, removeProperty, setProperties, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
-
Method Details
-
getFirstGridId
int getFirstGridId()Gets the first grid id.- Returns:
- the first grid id
-
getImage
-
getSpritesheet
Spritesheet getSpritesheet()Gets the spritesheet that contains the rendered tile images.- Returns:
- the spritesheet
-
getMargin
int getMargin()Gets the margin (in pixels) between the tileset image edge and the first tile.- Returns:
- the margin in pixels
-
getSpacing
int getSpacing()Gets the spacing (in pixels) between adjacent tiles in the tileset image.- Returns:
- the spacing in pixels
-
getTileDimension
-
getColumns
int getColumns()Gets the number of tile columns in the tileset.- Returns:
- the number of columns
-
getTileOffset
-
getTileHeight
int getTileHeight()Gets the tile height in pixels.- Returns:
- the tile height
-
getTileWidth
int getTileWidth()Gets the tile width.- Returns:
- the tile width
-
getTileCount
int getTileCount()Gets the total number of tiles defined by this tileset.- Returns:
- the tile count
-
getTile
Gets the tileset entry with the given local id.- Parameters:
id- the local tile id- Returns:
- the tileset entry, or
nullif no such entry exists
-
containsTile
Returns whether this tileset contains the supplied tile.- Parameters:
tile- the tile to test- Returns:
trueif this tileset contains the tile
-
containsTile
Returns whether this tileset contains the supplied tileset entry.- Parameters:
entry- the entry to test- Returns:
trueif this tileset contains the entry
-
containsTile
boolean containsTile(int tileId) Returns whether this tileset contains a tile with the supplied global id.- Parameters:
tileId- the global tile id- Returns:
trueif the global id belongs to this tileset
-
getTerrainSets
List<ITerrainSet> getTerrainSets()Gets the terrain sets defined by this tile set.- Returns:
- The terrain sets of this instance.
-