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 |
DEFAULT_PROPERTY_MAP_SIZE| Modifier and Type | Method and Description |
|---|---|
static GroupLayer |
create() |
void |
dispose() |
boolean |
equals(java.lang.Object o) |
static GroupLayer |
fromInputStream(java.io.DataInputStream inputStream) |
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 |
int |
hashCode() |
void |
onGroupLayerParsed(GroupLayer parsedLayer) |
void |
onObjectGroupParsed(TiledObjectGroup parsedObjectGroup) |
void |
onTileLayerParsed(TileLayer parsedLayer) |
void |
readData(java.io.DataInputStream inputStream)
Deserializes this object from a
DataInputStream |
java.lang.String |
toString() |
void |
writeData(java.io.DataOutputStream outputStream)
Serializes this object to a
DataOutputStream |
containsProperty, getIndex, getLayerType, getName, getProperties, getProperty, isVisible, setIndex, setName, setProperty, setVisibleprotected final org.mini2Dx.gdx.utils.Array<Layer> layers
protected final org.mini2Dx.gdx.utils.ObjectMap<java.lang.String,TiledObjectGroup> objectGroups
public static GroupLayer create()
public static GroupLayer fromInputStream(java.io.DataInputStream inputStream) throws java.io.IOException
java.io.IOExceptionpublic void writeData(java.io.DataOutputStream outputStream)
throws java.io.IOException
GameDataSerializableDataOutputStreamwriteData in interface GameDataSerializablewriteData in class LayeroutputStream - The DataOutputStream to write tojava.io.IOException - Thrown if an error occurs during I/Opublic void readData(java.io.DataInputStream inputStream)
throws java.io.IOException
GameDataSerializableDataInputStreamreadData in interface GameDataSerializablereadData in class LayerinputStream - The DataInputStream to read fromjava.io.IOException - Thrown if an error occurs during I/Opublic TileLayer getTileLayer(java.lang.String name)
TileLayer with the given namename - The name to search forTileLayerpublic 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)TileLayerpublic 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 forTiledObjectGrouppublic 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)TiledObjectGrouppublic 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 TiledLayerParserListenerpublic void onObjectGroupParsed(TiledObjectGroup parsedObjectGroup)
onObjectGroupParsed in interface TiledLayerParserListenerpublic void onGroupLayerParsed(GroupLayer parsedLayer)
onGroupLayerParsed in interface TiledLayerParserListenerpublic org.mini2Dx.gdx.utils.Array<Layer> getLayers()