Constructor
new RectangleCollider(colliderName, argsopt) → {void}
Create a new RectangleCollider
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
colliderName |
string |
name of this collider |
||
args |
object |
<optional> |
{} |
additional properties (e.g {width: 10, height: 20}) |
Properties:
Name | Type | Description |
---|---|---|
width |
float | |
height |
float |
Extends
- Collider
Methods
debugDraw(draw2d, entityX, entityY, coloropt) → {dynamic}
Draws the rectangle outline around the collider
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
draw2d |
object | |||
entityX |
float | |||
entityY |
float | |||
color |
integer |
<optional> |
&hFF0000FF |
refreshColliderRegion() → {void}
Refreshes the collider