new RigidCircle(xform, r) → {RigidCircle}
Parameters:
Name | Type | Description |
---|---|---|
xform |
Transform | Transform object |
r |
Number | Radius of circle |
- Source:
Returns:
New instance of RigidCircle
- Type
- RigidCircle
Methods
collided(otherShape, collisionInfo) → {Boolean}
Check for collision between this and RigidShape
Parameters:
Name | Type | Description |
---|---|---|
otherShape |
RigidShape | RigidShape object to check for collision status against |
collisionInfo |
CollisionInfo | Collision info of collision |
- Source:
Returns:
true if collision occurs
- Type
- Boolean
collidedCircCirc(c1, c2, collisionInfo) → {Boolean}
Parameters:
Name | Type | Description |
---|---|---|
c1 |
RigidCircle | Circle object to check for collision status |
c2 |
RigidCircle | Circle object to check for collision status against |
collisionInfo |
CollisionInfo | Collision info of collision |
- Source:
Returns:
true if collision occurs
- Type
- Boolean
containsPos(pos) → {Boolean}
Check if RigidShape contains position
Parameters:
Name | Type | Description |
---|---|---|
pos |
vec2 | Position to check |
- Source:
Returns:
true if position is in RigidShape
- Type
- Boolean
draw(aCamera) → {void}
Draw function called by GameLoop
Parameters:
Name | Type | Description |
---|---|---|
aCamera |
Camera | Camera to draw too |
- Source:
Returns:
- Type
- void
getRadius() → {Number}
Return the Cicle Radius size
- Source:
Returns:
Radius of circle
- Type
- Number
rigidType() → {enum|eRigidType}
Return the type of Rigidshape
- Source:
Returns:
- Type
- enum | eRigidType
setColor(color) → {void}
Set the Color of the position marker and sides
Parameters:
Name | Type | Description |
---|---|---|
color |
Array.<Float> | new color of marker and sides [R, G, B, A] |
- Source:
Returns:
- Type
- void