flatworld.utils.dataManipulation Class
These are utils for manipulating the data, that our classes and functions use.
Item Index
Methods
mapObjectsToArray
(
Array
-
objects
Changes the data from e.g. getting objects from the map based on coordinate. The data is like this normally: { units: [{ {... the objects datas ...} }] } We change it to this: [ [{ {... the objects datas ...} }] ]
Parameters:
-
objects
ObjectObject that holds objects
Returns:
Array:
Returns the transformed array