Constructor
Hitbox(parent: Object, x: number, y: number, width: number?, height: number?, mode: any)
Arguments:
| parent: Object | The base class of all objects in Kristal. |
| x: number | |
| y: number | |
| width: number? | |
| height: number? | |
| mode: any |
Methods
Hitbox:getShapeFor(other: Collider)
Gets this collider's shape as a rectangle or polygon (depending on transformation) for the given other collider.
Arguments:
| other: Collider | The other collider to get the shape for. |
Returns:
| aabb: boolean |
|
| shape: [number, number, number, number]|number[][] | The shape of the collider as a list of points or vertices. |