Class: TutorialBase

TutorialBase

Classes

State
Task
TaskList

Members

(non-null) api :up.api.Global

Type:

(nullable) currentState :string

Type:
  • string
Inherited From:

(nullable) globalOnEnter :function

Type:
  • function
Inherited From:

(nullable) globalOnExit :function

Type:
  • function
Inherited From:

(nullable) initialState :string

Type:
  • string
Inherited From:

numberOfStates :number

Type:
  • number
Inherited From:

(non-null) states :Object.<string, up.api.common.StateMachine.State>

Type:
Inherited From:

Methods

addState(stateName, stateDescription) → {boolean}

Parameters:
Name Type Description
stateName string The name of the state to add.
stateDescription Object The description of the state, with onEnter & onExit functions.
Inherited From:
Returns:
True. Always true.
Type
boolean

createConditionalStateDescriptor(nextState, message, goCondition) → {Object}

Parameters:
Name Type Description
nextState string The next state.
message string The message to show in the tutorial pane.
goCondition function The function to check conditions. If it returns true, continues to the next state.
Returns:
The state descriptor.
Type
Object

createState()

getCurrentState() → (nullable) {string}

Inherited From:
Returns:
The name of the current state, or null if the state machine hasn't been started.
Type
string

getStates() → (non-null) {Object.<string, up.api.common.StateMachine.State>}

Inherited From:
Returns:
The states.
Type
Object.<string, up.api.common.StateMachine.State>

gotoState(stateName)

Parameters:
Name Type Description
stateName string The name of the state to go to.
Inherited From:

rebindNextButton(stateName)

Parameters:
Name Type Description
stateName string The name of the state that the 'next' button should go to.

start()

Start the state machine.
Inherited From: