flatworld.ObjectManager Class
this module is responsible for doing hitTesting, like returning the units on certain clicked coordinates or when objects or areas collide with each other.
Constructor
flatworld.ObjectManager
()
Item Index
Methods
Methods
retrieve
(
Array
-
allCoords -
type -
options
Retrieve objects under certain coordinates or area, if size is given. Uses subcontainers when used, no other options yet.
Parameters:
-
allCoordsObjectThe coordinates which we want to hitTest
-
globalCoordsX:Integer, y:IntegerGlobal coordinates on static layer / canvas
-
xX:Integer, y:Integer -
yX:Integer, y:Integer
-
-
localCoordsObjectLocal coordiantes on movable layer
-
xX:Integer, y:Integer -
yX:Integer, y:Integer
-
-
-
typeStringtype of the object / layer that we want to retrieve
-
optionsObjectoptional options
Returns:
Array:
matched objects
