Package com.badlogic.gdx.maps.tiled
Class TiledMapTileSet
- java.lang.Object
-
- com.badlogic.gdx.maps.tiled.TiledMapTileSet
-
- All Implemented Interfaces:
java.lang.Iterable<TiledMapTile>
public class TiledMapTileSet extends java.lang.Object implements java.lang.Iterable<TiledMapTile>
-
-
Constructor Summary
Constructors Constructor Description TiledMapTileSet()Creates empty tileset
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()MapPropertiesgetProperties()TiledMapTilegetTile(int id)Gets theTiledMapTilethat has the given id.java.util.Iterator<TiledMapTile>iterator()voidputTile(int id, TiledMapTile tile)Adds or replaces tile with that idvoidremoveTile(int id)voidsetName(java.lang.String name)intsize()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Returns:
- tileset's name
-
setName
public void setName(java.lang.String name)
- Parameters:
name- new name for the tileset
-
getProperties
public MapProperties getProperties()
- Returns:
- tileset's properties set
-
getTile
public TiledMapTile getTile(int id)
Gets theTiledMapTilethat has the given id.- Parameters:
id- the id of theTiledMapTileto retrieve.- Returns:
- tile matching id, null if it doesn't exist
-
iterator
public java.util.Iterator<TiledMapTile> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<TiledMapTile>- Returns:
- iterator to tiles in this tileset
-
putTile
public void putTile(int id, TiledMapTile tile)Adds or replaces tile with that id- Parameters:
id- the id of theTiledMapTileto add or replace.tile- theTiledMapTileto add or replace.
-
removeTile
public void removeTile(int id)
- Parameters:
id- tile's id to be removed
-
size
public int size()
- Returns:
- the size of this TiledMapTileSet.
-
-