class Controller: Component

Defines what an actor does on its turn.

blackboard: table | nil
act(self: Controller, level: Level, actor: Actor): Action

Returns the Action that the actor will take on its turn. This should not modify the Level directly.

Parameters:
  • level (Level) – The level the actor is in.

  • actor (Actor) – The actor currently acting.

Returns:

_1 (Action) – The action the actor will perform.

__new(self: Object, ...: any)

The default constructor for the class. Subclasses should override this.