(name: string)
=> void Make the machine enter a state
param name- The new state
(name: string, cb: (sm: StateMachine, previous: string) => void)
=> void Set a callback for when the machine enters a state
param name- The state
param cb- The callback
(name: string, cb: (sm: StateMachine, current: string) => void)
=> void Set a callback for when the machine updates a state
param name- The state
param cb- The callback
(name: string, cb: (sm: StateMachine, current: string) => void)
=> void Set a callback for when the machine draws a state
param name- The state
param cb- The callback
(name: string, cb: (sm: StateMachine, next: string) => void)
=> void Set a callback for when the machine exits a state
param name- The state
param cb- The callback
(from: string, to: string, cb: (sm: StateMachine, from: string, to: string) => void)
=> void Set a callback for when the machine transitions from one state to the other state
param from- The state which is exited
param to- The state which is entered
param cb- The callback