Collider
Collider created by $.makeBoxCollider() and $.makeCircleCollider()
Properties
- x//number
- y//number
- w//number
- h//number
- fill//colour string
- stroke//colour string
- mass//number
- bounciness//number
- friction//number
- static//boolean
- rotation//number
- direction//number
- speed//number
- velocity.x//number
- velocity.y//number
- lifespan//number
- previousPosition//Point
- movedByCamera//boolean
- asset//Asset
Methods
- draw()//Draws the image at its current x and y co-ords
- remove()//Marks the collider for removal
- overlaps()//Checks if it overlaps with another collidable entity
- collides()//Checks if it collides with another collidable entity
- getAngleToPoint(x,y,)//Returns the current angle you would need to give for this entity face that location