com.badlogic.gdx.maps
Class MapLayers
java.lang.Object
com.badlogic.gdx.maps.MapLayers
- All Implemented Interfaces:
- Iterable<MapLayer>
public class MapLayers
- extends Object
- implements Iterable<MapLayer>
Ordered list of MapLayer
instances owned by a Map
MapLayers
public MapLayers()
get
public MapLayer get(int index)
- Parameters:
index
-
- Returns:
- layer at index
get
public MapLayer get(String name)
- Parameters:
name
-
- Returns:
- first layer matching the name, null otherwise
getCount
public int getCount()
- Returns:
- number of layers in the collection
add
public void add(MapLayer layer)
- Parameters:
layer
- layer to be added to the set
remove
public void remove(int index)
- Parameters:
index
- removes layer at index
remove
public void remove(MapLayer layer)
- Parameters:
layer
- layer to be removed
getByType
public <T extends MapLayer> Array<T> getByType(Class<T> type)
- Parameters:
type
-
- Returns:
- array with all the layers matching type
getByType
public <T extends MapLayer> Array<T> getByType(Class<T> type,
Array<T> fill)
- Parameters:
type
- fill
- array to be filled with the matching layers
- Returns:
- array with all the layers matching type
iterator
public Iterator<MapLayer> iterator()
- Specified by:
iterator
in interface Iterable<MapLayer>
- Returns:
- iterator to set of layers
Copyright © 2013. All Rights Reserved.