(abstract) new ActorComponent()
Create a new actor component.
Methods
destructor()
Handle the deletion of the component.
draw(ctx)
Draw the component.
Parameters:
Name | Type | Description |
---|---|---|
ctx | CanvasRenderingContext2D | Canvas context to draw on |
drawDebug(ctx)
Draw debugging info for the component.
Parameters:
Name | Type | Description |
---|---|---|
ctx | CanvasRenderingContext2D | Canvas context to draw on |
init()
Initialize the component.
update(elapsed)
Update the component.
Parameters:
Name | Type | Description |
---|---|---|
elapsed | number | Time since last update cycle in seconds |