new CircleRendererComponent(pRadius, pColor, pOwner)
The circle renderer component is used to render a circle associated to a game
object.
Parameters:
| Name | Type | Description |
|---|---|---|
pRadius |
int | Radius of the circle to render. |
pColor |
string | The color of the circle to render. |
pOwner |
FM.GameObject | The game object that owns this component. |
Extends
Members
-
name :FM.ComponentTypes
-
Component's name.
Type:
- Inherited From:
- Source:
-
owner :FM.GameObject
-
Component's owner.
Type:
- Inherited From:
- Source:
Methods
-
destroy()
-
Destroy the component and its objects.
-
draw(bufferContext, newPosition)
-
Draw the circle.
Parameters:
Name Type Description bufferContextCanvasRenderingContext2D Context on which drawing is done. newPositionFM.Vector The position of the circle to draw. -
getAlpha() → {float}
-
Retrieve the transparency value of the circle.
Returns:
Current transparency value.- Type
- float
-
getColor() → {string}
-
Retrieve the color of the circle.
Returns:
The color of the circle.- Type
- string
-
getHeight() → {int}
-
Retrieve the height of the circle.
Returns:
The height of the circle.- Type
- int
-
getRadius() → {int}
-
Retrieve the radius of the circle.
Returns:
The radius of the circle.- Type
- int
-
getWidth() → {int}
-
Retrieve the width of the circle.
Returns:
The width of the circle.- Type
- int
-
setAlpha(pNewAlpha)
-
Set the transparency of the circle.
Parameters:
Name Type Description pNewAlphafloat New transparency value desired. -
setColor(pNewColor)
-
Set the color of the circle.
Parameters:
Name Type Description pNewColorstring New color desired. -
setHeight(pNewHeight)
-
Set the height of the circle.
Parameters:
Name Type Description pNewHeightint New height desired. -
setRadius(pNewRadius)
-
Set the radius of the circle.
Parameters:
Name Type Description pNewRadiusint New radius desired. -
setWidth(pNewWidth)
-
Set the width of the circle.
Parameters:
Name Type Description pNewWidthint New width desired.