KSP API
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Public Attributes | List of all members
TutorialScenario.TutorialFSM Class Reference

The TutorialFSM provides a convient interface for implementing the meat of your scenario logic through a finite state machine. The states of the state machine are "pages." More...

Inheritance diagram for TutorialScenario.TutorialFSM:
KerbalFSM

Public Member Functions

 TutorialFSM ()
 
void AddPage (TutorialScenario.TutorialPage st)
 Add a page (a new possible state) to the tutorial. More...
 
void AddState (TutorialScenario.TutorialPage st)
 Add a page (a new possible state) to the tutorial, but outside the default page sequence that will be used by GoToLastPage and GoToNextPage. More...
 
void GoToLastPage ()
 Transition the tutorial to the page before the current one in the default page sequence. More...
 
void GoToNextPage ()
 Transition the tutorial to the page after current one in the default page sequence. More...
 
void StartTutorial (string initialPageName)
 Start the finite state machine on the page with the given name. More...
 
void StartTutorial (TutorialScenario.TutorialPage initialPage)
 Start the finite state machine on the given page. More...
 
- Public Member Functions inherited from KerbalFSM
 KerbalFSM ()
 
void AddEvent (KFSMEvent ev, params KFSMState[] toStates)
 Add a new event (possible transition) to the finite state machine. More...
 
void AddEventExcluding (KFSMEvent ev, params KFSMState[] excStates)
 Add a new event (possible transition) to the finite state machine. More...
 
void AddState (KFSMState st)
 Add a new possible state to the machine. More...
 
void FixedUpdateFSM ()
 
void LateUpdateFSM ()
 
void RunEvent (KFSMEvent evt)
 Cause the machine to execute the transition specified by evt. More...
 
void StartFSM (KFSMState initialState)
 Start the state machine in a given initial state. More...
 
void StartFSM (string initialStateName)
 Start the state machine in a given initial state. More...
 
void UpdateFSM ()
 

Public Attributes

TutorialScenario.TutorialPage lastPage
 The page that the tutorial was on before this one. More...
 
List
< TutorialScenario.TutorialPage
pages
 The list of all pages in the tutorial. More...
 
- Public Attributes inherited from KerbalFSM
string currentStateName
 The name of the state the machine is currently in. More...
 
bool DebugBreakOnStateChange
 
string lastEventName
 The name of the last event that occurred. More...
 

Additional Inherited Members

- Protected Member Functions inherited from KerbalFSM
void updateFSM (KFSMUpdateMode mode)
 
- Protected Attributes inherited from KerbalFSM
KFSMState currentState
 
bool fsmStarted
 
KFSMEvent lastEvent
 
KFSMState lastState
 
List< KFSMStateStates
 
- Properties inherited from KerbalFSM
KFSMState CurrentState [get]
 The state the machine is currently in. More...
 
int FramesInCurrentState [get]
 How many frames the machine has been in this state. More...
 
KFSMEvent LastEvent [get]
 The last event that occurred. More...
 
KFSMState LastState [get]
 The state the machine was in before this state. More...
 
bool Started [get]
 Whether the state machine has been started. More...
 
double TimeAtCurrentState [get]
 How long the machine has been in the current state, in seconds. More...
 

Detailed Description

The TutorialFSM provides a convient interface for implementing the meat of your scenario logic through a finite state machine. The states of the state machine are "pages."

Constructor & Destructor Documentation

TutorialScenario.TutorialFSM.TutorialFSM ( )

Member Function Documentation

void TutorialScenario.TutorialFSM.AddPage ( TutorialScenario.TutorialPage  st)

Add a page (a new possible state) to the tutorial.

Parameters
stThe page to add.
void TutorialScenario.TutorialFSM.AddState ( TutorialScenario.TutorialPage  st)

Add a page (a new possible state) to the tutorial, but outside the default page sequence that will be used by GoToLastPage and GoToNextPage.

Parameters
stThe page to add.
void TutorialScenario.TutorialFSM.GoToLastPage ( )

Transition the tutorial to the page before the current one in the default page sequence.

void TutorialScenario.TutorialFSM.GoToNextPage ( )

Transition the tutorial to the page after current one in the default page sequence.

void TutorialScenario.TutorialFSM.StartTutorial ( string  initialPageName)

Start the finite state machine on the page with the given name.

Parameters
initialPageNameThe name of the page to start on.
void TutorialScenario.TutorialFSM.StartTutorial ( TutorialScenario.TutorialPage  initialPage)

Start the finite state machine on the given page.

Parameters
initialPageThe page to start one.

Member Data Documentation

TutorialScenario.TutorialPage TutorialScenario.TutorialFSM.lastPage

The page that the tutorial was on before this one.

List<TutorialScenario.TutorialPage> TutorialScenario.TutorialFSM.pages

The list of all pages in the tutorial.


The documentation for this class was generated from the following file: