Constructor
new Controller(id, map)
Create a new controller.
Parameters:
Name | Type | Description |
---|---|---|
id | string | Identifier of controller |
map | Object.<string, function()> | Controls mapping |
- Source
Methods
update(actor, elapsed)
Call the controller's update function.
Parameters:
Name | Type | Description |
---|---|---|
actor | MovingActor | The actor to update |
elapsed | number | Time since last update cycle in seconds |
- Source