ActorComponent

(abstract) new ActorComponent()

Create a new actor component.

Methods

destructor()

Handle the deletion of the component.

draw(ctx)

Draw the component.
Parameters:
NameTypeDescription
ctxCanvasRenderingContext2DCanvas context to draw on

drawDebug(ctx)

Draw debugging info for the component.
Parameters:
NameTypeDescription
ctxCanvasRenderingContext2DCanvas context to draw on

init()

Initialize the component.

update(elapsed)

Update the component.
Parameters:
NameTypeDescription
elapsednumberTime since last update cycle in seconds