Collidable Class
A component class which holds the collision properties of an entity.
Constructor
Collidable
-
restitution
-
friction
-
category
-
collideWith
Parameters:
-
restitution
Number -
friction
Number -
category
NumberA set of bit flags that describe the entity's collision category. The number will be converted to a 32bit long integer and used to check whether the object should collide with other objects.
-
collideWith
NumberA set of bit flags that describe collision categories that this entity will collide with. The number will be converted to a 32bit long integer and used to check whether the object should collide with other objects.
Item Index
Methods
getCategory
()
Number
Returns:
getCollideWith
()
Number
Returns:
getFriction
()
Number
Returns:
getRestitution
()
Number
Returns:
setCategory
-
category
A set of bit flags that describe the entity's collision category. The number will be converted to a 32bit long integer and used to check whether the object should collide with other objects.
Parameters:
-
category
Number
setCollideWith
-
collideWith
A set of bit flags that describe collision categories that this entity will collide with. The number will be converted to a 32bit long integer and used to check whether the object should collide with other objects.
Parameters:
-
collideWith
Number
setFriction
-
friction
Parameters:
-
friction
Number
setRestitution
-
restitution
Parameters:
-
restitution
Number