Class: CircleRendererComponent

CircleRendererComponent

FM.CircleRendererComponent

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.
Author:
  • Simon Chauvin
Source:

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.
Source:

draw(bufferContext, newPosition)

Draw the circle.
Parameters:
Name Type Description
bufferContext CanvasRenderingContext2D Context on which drawing is done.
newPosition FM.Vector The position of the circle to draw.
Source:

getAlpha() → {float}

Retrieve the transparency value of the circle.
Source:
Returns:
Current transparency value.
Type
float

getColor() → {string}

Retrieve the color of the circle.
Source:
Returns:
The color of the circle.
Type
string

getHeight() → {int}

Retrieve the height of the circle.
Source:
Returns:
The height of the circle.
Type
int

getRadius() → {int}

Retrieve the radius of the circle.
Source:
Returns:
The radius of the circle.
Type
int

getWidth() → {int}

Retrieve the width of the circle.
Source:
Returns:
The width of the circle.
Type
int

setAlpha(pNewAlpha)

Set the transparency of the circle.
Parameters:
Name Type Description
pNewAlpha float New transparency value desired.
Source:

setColor(pNewColor)

Set the color of the circle.
Parameters:
Name Type Description
pNewColor string New color desired.
Source:

setHeight(pNewHeight)

Set the height of the circle.
Parameters:
Name Type Description
pNewHeight int New height desired.
Source:

setRadius(pNewRadius)

Set the radius of the circle.
Parameters:
Name Type Description
pNewRadius int New radius desired.
Source:

setWidth(pNewWidth)

Set the width of the circle.
Parameters:
Name Type Description
pNewWidth int New width desired.
Source: