Interface ILayerList
- All Superinterfaces:
ICustomPropertyProvider
- All Known Subinterfaces:
IGroupLayer,IMap
- All Known Implementing Classes:
GroupLayer,TmxMap
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds anILayerto the Layer list at the given index.voidAdds anILayerto the Layer list.Gets theIGroupLayers contained in a Layer list.Gets theIImageLayers contained in a Layer list.default IMapObjectgetMapObject(int mapId) Gets the firstIMapObjectwith the given ID from a layer list.default IMapObjectLayergetMapObjectLayer(int layerId) default IMapObjectLayergetMapObjectLayer(IMapObject mapObject) Gets theIMapObjectLayercontaining a givenIMapObject.default IMapObjectLayergetMapObjectLayer(String layerName) Gets all MapObjectLayers in the Layer list.default Collection<IMapObject> Gets all map objects in the layer list.default Collection<IMapObject> getMapObjects(int... mapIDs) Gets all map objects in the layer list using the map IDs passed as a parameter.default Collection<IMapObject> getMapObjects(String... types) Gets all map objects in the layer list that belong to the types passed as a parameter.Gets all render layers in the Layer list.Gets theITileLayers contained in a Layer list.voidremoveLayer(int index) Removes a layer from the Layer list.voidremoveLayer(ILayer layer) Removes anILayerfrom the Layer list.default voidremoveMapObject(int mapId) Removes the firstIMapObjectwith the given ID.Methods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.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
-
getRenderLayers
-
getMapObjectLayers
List<IMapObjectLayer> getMapObjectLayers()Gets all MapObjectLayers in the Layer list.- Returns:
- a List of IMapObjectLayers
-
addLayer
Adds anILayerto the Layer list.- Parameters:
layer- the layer to be added
-
addLayer
Adds anILayerto the Layer list at the given index.- Parameters:
index- the indexlayer- the layer to be added
-
removeLayer
Removes anILayerfrom the Layer list.- Parameters:
layer- the layer to be removed
-
getMapObjectLayer
Gets theIMapObjectLayercontaining a givenIMapObject.- Parameters:
mapObject- the map object being searched- Returns:
- the map object layer containing the map object
-
getMapObjectLayer
-
getMapObjectLayer
-
removeLayer
void removeLayer(int index) Removes a layer from the Layer list.- Parameters:
index- the index of the layer to be removed
-
getMapObjects
Gets all map objects in the layer list.- Returns:
- a Collection of all IMapObjects in the layer list
-
getMapObjects
Gets all map objects in the layer list that belong to the types passed as a parameter.- Parameters:
types- an array of types for which the layer list is searched- Returns:
- a Collection of IMapObjects matching the given MapObjectTypes
-
getMapObjects
Gets all map objects in the layer list using the map IDs passed as a parameter. Please note that map IDs are intended to be unique identifiers forIMapObjects (and their correspondingEntity). This method is just a way of checking for non-unique IDs and re-assigning them before adding entities.- Parameters:
mapIDs- an array of mapIDs for which the layer list is searched- Returns:
- a Collection of IMapObjects matching the given MapObject IDs
- See Also:
-
getMapObject
Gets the firstIMapObjectwith the given ID from a layer list.- Parameters:
mapId- the map id of the desiredIMapObject- Returns:
- the
IMapObjectwith the given ID
-
removeMapObject
default void removeMapObject(int mapId) Removes the firstIMapObjectwith the given ID.- Parameters:
mapId- the map id of theIMapObjectwe want to remove
-
getTileLayers
List<ITileLayer> getTileLayers()Gets theITileLayers contained in a Layer list.- Returns:
- a
Listof allITileLayers
-
getImageLayers
List<IImageLayer> getImageLayers()Gets theIImageLayers contained in a Layer list.- Returns:
- a
Listof allIImageLayers
-
getGroupLayers
List<IGroupLayer> getGroupLayers()Gets theIGroupLayers contained in a Layer list.- Returns:
- a
Listof allIGroupLayers
-