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

Represents a state in a KerbalFSM finite state machine. More...

Inheritance diagram for KFSMState:
TutorialScenario.TutorialPage

Public Member Functions

 KFSMState (string name)
 Create a new KFSMState with a given name. More...
 
void AddEvent (KFSMEvent ev)
 Add an event (possible transition) to this state. More...
 
bool IsValid (KFSMEvent ev)
 Whether the given event can be triggered from this state. An event must be added to a state before it can be triggered from that state. More...
 
override string ToString ()
 

Public Attributes

int FrameCountAtStateEnter
 
string name
 The name of this state. More...
 
KFSMStateChange OnEnter
 You can assign to this field a delegate that takes a KFSMState (which will be this state). The delegate will be called when the state machine enters this state. More...
 
KFSMCallback OnFixedUpdate
 You can assign a delegate to this field, and the delegate will be called during each FixedUpdate while the state machine is in this state. More...
 
KFSMCallback OnLateUpdate
 You can assign a delegate to this field, and the delegate will be called during each LateUpdate while the state machine is in this state. More...
 
KFSMStateChange OnLeave
 You can assign to this field a delegate that takes a KFSMState. The delegate will be called when the state machine leaves this state, and the argument passed to the delegate will be the new state that the machine is transitioning to. More...
 
KFSMCallback OnUpdate
 You can assign a delegate to this field, and the delegate will be call during each Update while the state machine is in this state. More...
 
double TimeAtStateEnter
 
KFSMUpdateMode updateMode
 

Protected Attributes

List< KFSMEventstateEvents
 

Properties

List< KFSMEventStateEvents [get]
 The set of events that are valid for this state (i.e., the possible transitions from this state). More...
 

Detailed Description

Represents a state in a KerbalFSM finite state machine.

Constructor & Destructor Documentation

KFSMState.KFSMState ( string  name)

Create a new KFSMState with a given name.

Parameters
nameThe name of the new state.

Member Function Documentation

void KFSMState.AddEvent ( KFSMEvent  ev)

Add an event (possible transition) to this state.

Parameters
evThe event to add.
bool KFSMState.IsValid ( KFSMEvent  ev)

Whether the given event can be triggered from this state. An event must be added to a state before it can be triggered from that state.

Parameters
evThe event to check.
Returns
Whether the event can be triggered from this state.
override string KFSMState.ToString ( )

Member Data Documentation

int KFSMState.FrameCountAtStateEnter
string KFSMState.name

The name of this state.

KFSMStateChange KFSMState.OnEnter

You can assign to this field a delegate that takes a KFSMState (which will be this state). The delegate will be called when the state machine enters this state.

KFSMCallback KFSMState.OnFixedUpdate

You can assign a delegate to this field, and the delegate will be called during each FixedUpdate while the state machine is in this state.

KFSMCallback KFSMState.OnLateUpdate

You can assign a delegate to this field, and the delegate will be called during each LateUpdate while the state machine is in this state.

KFSMStateChange KFSMState.OnLeave

You can assign to this field a delegate that takes a KFSMState. The delegate will be called when the state machine leaves this state, and the argument passed to the delegate will be the new state that the machine is transitioning to.

KFSMCallback KFSMState.OnUpdate

You can assign a delegate to this field, and the delegate will be call during each Update while the state machine is in this state.

List<KFSMEvent> KFSMState.stateEvents
protected
double KFSMState.TimeAtStateEnter
KFSMUpdateMode KFSMState.updateMode

Property Documentation

List<KFSMEvent> KFSMState.StateEvents
get

The set of events that are valid for this state (i.e., the possible transitions from this state).


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