public class GroupLayer extends Layer implements TiledLayerParserListener
Modifier and Type | Field and Description |
---|---|
protected org.mini2Dx.gdx.utils.Array<Layer> |
layers |
protected org.mini2Dx.gdx.utils.ObjectMap<java.lang.String,TiledObjectGroup> |
objectGroups |
Constructor and Description |
---|
GroupLayer() |
Modifier and Type | Method and Description |
---|---|
GroupLayer |
getGroupLayer(int index)
Returns the
GroupLayer at the given index |
GroupLayer |
getGroupLayer(java.lang.String name)
Returns the
GroupLayer with the given name |
GroupLayer |
getGroupLayer(java.lang.String name,
boolean recursive)
Returns the
GroupLayer with the given name |
org.mini2Dx.gdx.utils.Array<Layer> |
getLayers() |
TiledObjectGroup |
getObjectGroup(java.lang.String name)
Returns the
TiledObjectGroup with the given name |
TiledObjectGroup |
getObjectGroup(java.lang.String name,
boolean recursive)
Returns the
TiledObjectGroup with the given name |
TileLayer |
getTileLayer(int index)
Returns the
TileLayer at the given index |
TileLayer |
getTileLayer(java.lang.String name)
Returns the
TileLayer with the given name |
TileLayer |
getTileLayer(java.lang.String name,
boolean recursive)
Returns the
TileLayer with the given name |
void |
onGroupLayerParsed(GroupLayer parsedLayer) |
void |
onObjectGroupParsed(TiledObjectGroup parsedObjectGroup) |
void |
onTileLayerParsed(TileLayer parsedLayer) |
containsProperty, getIndex, getLayerType, getName, getProperties, getProperty, isVisible, setIndex, setName, setProperty, setVisible
protected final org.mini2Dx.gdx.utils.Array<Layer> layers
protected final org.mini2Dx.gdx.utils.ObjectMap<java.lang.String,TiledObjectGroup> objectGroups
public TileLayer getTileLayer(java.lang.String name)
TileLayer
with the given namename
- The name to search forTileLayer
public TileLayer getTileLayer(java.lang.String name, boolean recursive)
TileLayer
with the given namename
- The name to search forrecursive
- False if only the group's immediate child layers should be searched (ignoring descendants)TileLayer
public GroupLayer getGroupLayer(java.lang.String name)
GroupLayer
with the given namename
- The name of the layerpublic GroupLayer getGroupLayer(java.lang.String name, boolean recursive)
GroupLayer
with the given namename
- The name of the layerrecursive
- False if only the group's immediate child layers should be searched (ignoring descendants)public TiledObjectGroup getObjectGroup(java.lang.String name)
TiledObjectGroup
with the given namename
- The name to search forTiledObjectGroup
public TiledObjectGroup getObjectGroup(java.lang.String name, boolean recursive)
TiledObjectGroup
with the given namename
- The name to search forrecursive
- False if only the immediate layers should be searched (ignoring descendants)TiledObjectGroup
public TileLayer getTileLayer(int index)
TileLayer
at the given indexindex
- The index of the layerpublic GroupLayer getGroupLayer(int index)
GroupLayer
at the given indexindex
- The index of the layerpublic void onTileLayerParsed(TileLayer parsedLayer)
onTileLayerParsed
in interface TiledLayerParserListener
public void onObjectGroupParsed(TiledObjectGroup parsedObjectGroup)
onObjectGroupParsed
in interface TiledLayerParserListener
public void onGroupLayerParsed(GroupLayer parsedLayer)
onGroupLayerParsed
in interface TiledLayerParserListener
public org.mini2Dx.gdx.utils.Array<Layer> getLayers()