Package com.badlogic.gdx.maps.tiled
Class TiledMapTileSets
- java.lang.Object
-
- com.badlogic.gdx.maps.tiled.TiledMapTileSets
-
- All Implemented Interfaces:
java.lang.Iterable<TiledMapTileSet>
public class TiledMapTileSets extends java.lang.Object implements java.lang.Iterable<TiledMapTileSet>
-
-
Constructor Summary
Constructors Constructor Description TiledMapTileSets()Creates an empty collection of tilesets.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTileSet(TiledMapTileSet tileset)TiledMapTilegetTile(int id)TiledMapTileSetgetTileSet(int index)TiledMapTileSetgetTileSet(java.lang.String name)java.util.Iterator<TiledMapTileSet>iterator()voidremoveTileSet(int index)Removes tileset at indexvoidremoveTileSet(TiledMapTileSet tileset)
-
-
-
Method Detail
-
getTileSet
public TiledMapTileSet getTileSet(int index)
- Parameters:
index- index to get the desiredTiledMapTileSetat.- Returns:
- tileset at index
-
getTileSet
public TiledMapTileSet getTileSet(java.lang.String name)
- Parameters:
name- Name of theTiledMapTileSetto retrieve.- Returns:
- tileset with matching name, null if it doesn't exist
-
addTileSet
public void addTileSet(TiledMapTileSet tileset)
- Parameters:
tileset- set to be added to the collection
-
removeTileSet
public void removeTileSet(int index)
Removes tileset at index- Parameters:
index- index at which to remove a tileset.
-
removeTileSet
public void removeTileSet(TiledMapTileSet tileset)
- Parameters:
tileset- set to be removed
-
getTile
public TiledMapTile getTile(int id)
- Parameters:
id- id of theTiledMapTileto get.- Returns:
- tile with matching id, null if it doesn't exist
-
iterator
public java.util.Iterator<TiledMapTileSet> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<TiledMapTileSet>- Returns:
- iterator to tilesets
-
-