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:
-
allCoords
ObjectThe coordinates which we want to hitTest
-
globalCoords
X:Integer, y:IntegerGlobal coordinates on static layer / canvas
-
x
X:Integer, y:Integer -
y
X:Integer, y:Integer
-
-
localCoords
ObjectLocal coordiantes on movable layer
-
x
X:Integer, y:Integer -
y
X:Integer, y:Integer
-
-
-
type
Stringtype of the object / layer that we want to retrieve
-
options
Objectoptional options
Returns:
Array:
matched objects