com.badlogic.gdx.maps.tiled
Class TiledMapTileSet
java.lang.Object
com.badlogic.gdx.maps.tiled.TiledMapTileSet
- All Implemented Interfaces:
- Iterable<TiledMapTile>
public class TiledMapTileSet
- extends Object
- implements Iterable<TiledMapTile>
TiledMapTileSet
public TiledMapTileSet()
- Creates empty tileset
getName
public String getName()
- Returns:
- tileset's name
setName
public void setName(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 the
TiledMapTile
that has the given id.
- Parameters:
id
- the id of the TiledMapTile
to retrieve.
- Returns:
- tile matching id, null if it doesn't exist
iterator
public Iterator<TiledMapTile> iterator()
- Specified by:
iterator
in interface 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 the TiledMapTile
to add or replace.tile
- the TiledMapTile
to 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.
Copyright © 2014. All Rights Reserved.