Classes
Collision
Contains some useful methods for detecting whether or not a collision with an entity has occurred. Collision detection in JackyJS also factors in things like entity scaling, origin, and bounding box.
Methods (static)
Name | Parameter | Type | Description |
---|---|---|---|
instanceMeeting | searches for any matching entities at position x, y. If any entities are found, they are returned in an array, else FALSE is returned. If the top parameter is set to TRUE, only the topmost matching entity is returned. | ||
* x | Number | x coordinate to check for instances. | |
* y | Number | y coordinate to check for instances. | |
top | Boolean | if TRUE, returns the TOP entity. | |
instancePlace | checks to see if an instance of entity obj exists at position x, y. Returns TRUE if there is a match, FALSE if not. | ||
* x | Number | x coordinate to check for an instance. | |
* y | Number | y coordinate to check for an instance. | |
* obj | Object | entity object to match an instance of. | |
instanceFree | checks to see if there are instances of ANY entities at position x, y. Returns TRUE if yes, and FALSE if not. | ||
* x | Number | x coordinate to check for instances. | |
* y | Number | y coordinate to check for instances. |