Kalevala.Character.Controller behaviour (kalevala v0.1.0) View Source
Kalevala controllers are the current set of actions for the user
For instance, you might have a LoginController that handles authentication, that then passes to a CommandController to start processing player commands after they signed in.
Link to this section Summary
Functions
Marks the module as a controller and imports controller functions
Callbacks
Called when a Kalevala.Character.Event.Display
is sent to the foreman process
Called when a Kalevala.Character.Event
is sent to the foreman process
Called when the controller is first switched to
Called when text is received from the player
Called when the connection receives an event (e.g. incoming GMCP)
Link to this section Functions
Marks the module as a controller and imports controller functions
Link to this section Callbacks
Specs
display(Kalevala.Character.Conn.t(), Kalevala.Character.Event.t()) :: Kalevala.Character.Conn.t()
Called when a Kalevala.Character.Event.Display
is sent to the foreman process
Specs
event(Kalevala.Character.Conn.t(), Kalevala.Character.Event.t()) :: Kalevala.Character.Conn.t()
Called when a Kalevala.Character.Event
is sent to the foreman process
Specs
init(Kalevala.Character.Conn.t()) :: Kalevala.Character.Conn.t()
Called when the controller is first switched to
Specs
recv(Kalevala.Character.Conn.t(), String.t()) :: Kalevala.Character.Conn.t()
Called when text is received from the player
Specs
recv_event(Kalevala.Character.Conn.t(), any()) :: Kalevala.Character.Conn.t()
Called when the connection receives an event (e.g. incoming GMCP)