Grape.CollisionSystem Class
A system, which handles broad phase collision detection of Collidable instances added to the system's layer. It uses spatial partitioning algorithm, creating a partition for each class and tag only if they have collision event handler. Note that the collision system gets the instances of the layer directly, not through an event emission, so instances in sub-layers won't collide.
Item Index
Methods
createStaticPartition
(
-
name
(Re)creates a partition table for a class or a tag. This table is used to check collision until removed.
Parameters:
-
name
String | ClassTag or class
getLayer
()
Grape.Layer | Undefined
Returns the layer the system is added to.
Returns:
Grape.Layer | Undefined:
The layer
removeStaticPartition
(
-
name
Removes a partition table for a class or a tag.
Parameters:
-
name
String | ClassTag or class