Controller

Controls moving actors by user input.

Constructor

new Controller(id, map)

Create a new controller.
Parameters:
NameTypeDescription
idstringIdentifier of controller
mapObject.<string, function()>Controls mapping

Methods

update(actor, elapsed)

Call the controller's update function.
Parameters:
NameTypeDescription
actorMovingActorThe actor to update
elapsednumberTime since last update cycle in seconds