Package com.badlogic.gdx.maps
Class MapObjects
java.lang.Object
com.badlogic.gdx.maps.MapObjects
-
Constructor Details
-
MapObjects
public MapObjects()Creates an empty set of MapObject instances
-
-
Method Details
-
get
- Parameters:
index
-- Returns:
- the MapObject at the specified index
-
get
- Parameters:
name
-- Returns:
- the first object having the specified name, if one exists, otherwise null
-
getIndex
Get the index of the object having the specified name, or -1 if no such object exists. -
getIndex
Get the index of the object in the collection, or -1 if no such object exists. -
getCount
public int getCount()- Returns:
- number of objects in the collection
-
add
- Parameters:
object
- instance to be added to the collection
-
remove
public void remove(int index) - Parameters:
index
- removes MapObject instance at index
-
remove
- Parameters:
object
- instance to be removed
-
getByType
- Parameters:
type
- class of the objects we want to retrieve- Returns:
- array filled with all the objects in the collection matching type
-
getByType
- Parameters:
type
- class of the objects we want to retrievefill
- collection to put the returned objects in- Returns:
- array filled with all the objects in the collection matching type
-
iterator
-