Arbor 3: FSM & BT Graph Editor  3.7.8
State Class Reference

Class that represents the state More...

Inheritance diagram for State:
Node INodeBehaviourContainer

Public Member Functions

 State (ArborFSMInternal stateMachine, int nodeID, bool resident)
 State constructor More...
 
void AddBehaviour (StateBehaviour behaviour)
 Adds the behaviour. More...
 
StateBehaviour AddBehaviour (System.Type type)
 Adds the behaviour. More...
 
AddBehaviour< T > ()
 Adds the behaviour. More...
 
void InsertBehaviour (int index, StateBehaviour behaviour)
 Insert the behaviour. More...
 
StateBehaviour InsertBehaviour (int index, System.Type type)
 Insert the behaviour. More...
 
InsertBehaviour< T > (int index)
 Adds the behaviour. More...
 
StateBehaviour GetBehaviourFromIndex (int index)
 Get StateBehavior from index. More...
 
Object GetBehaviourObjectFromIndex (int index)
 Get Object of StateBehavior from index. More...
 
StateBehaviour GetBehaviour (System.Type type)
 Gets the behaviour. More...
 
GetBehaviour< T > ()
 Gets the behaviour. More...
 
StateBehaviour[] GetBehaviours (System.Type type)
 Gets the behaviours. More...
 
T[] GetBehaviours< T > ()
 Gets the behaviours. More...
 
bool Contains (StateBehaviour behaviour)
 Whether StateBehaviour are included. More...
 
int IndexOfBehaviour (Object behaviourObj)
 Return index of StateBehaviour. More...
 
void RemoveBehaviour (Object behaviourObj)
 I want to remove the StateBehaviour. More...
 
void RemoveBehaviourAt (int behaviourIndex)
 I want to remove the StateBehaviour. More...
 
void SwapBehaviour (int fromIndex, int toIndex)
 Swap the order of StateBehaviour. More...
 
void MoveBehaviour (int fromIndex, State toState, int toIndex)
 Move the order of StateBehaviour. More...
 
void SetBehaviour (int index, StateBehaviour behaviour)
 Set StateBehaviour. More...
 
override bool IsContainsBehaviour (NodeBehaviour behaviour)
 Check if it contains NodeBehaviour. More...
 
void DisconnectState (int stateID)
 For internal. More...
 
void DestroyBehaviour (Object behaviourObj)
 Destroy StateBehaviour More...
 
void DestroyBehaviourAt (int behaviourIndex)
 Destroy StateBehaviour More...
 
void DestroyBehaviours ()
 For internal. More...
 
void UpdateBehaviours ()
 For internal. More...
 
void LateUpdateBehaviours ()
 For internal. More...
 
void SendTrigger (string message)
 Send a trigger message. More...
 
override string GetName ()
 Get node name. More...
 
- Public Member Functions inherited from Node
 Node (NodeGraph nodeGraph, int nodeID)
 Node constructor More...
 
virtual bool IsDeletable ()
 Returns whether or not it can be deleted. More...
 
override string ToString ()
 Convert node to string (for debugging). More...
 

Public Attributes

string name = "New State"
 The name of the state. More...
 
- Public Attributes inherited from Node
Rect position
 Position on the Arbor Editor. More...
 
bool showComment
 Whether to display comments More...
 
string nodeComment
 Comment More...
 

Protected Member Functions

override void OnGraphChanged ()
 Called when the NodeGraph to which the Node belongs has changed. More...
 

Properties

ArborFSMInternal stateMachine [get]
 Gets the state machine. More...
 
StateBehaviour[] behaviours [get]
 Deprecated. More...
 
int behaviourCount [get]
 Get a count of Behavior. More...
 
int stateID [get]
 Gets the state identifier. More...
 
bool resident [get]
 Gets a value indicating whether this State is resident. More...
 
bool breakPoint [get, set]
 Break point. More...
 
uint transitionCount [get, set]
 Transition count. More...
 
- Properties inherited from Node
NodeGraph nodeGraph [get]
 Gets the NodeGraph. More...
 
int nodeID [get]
 Gets the node identifier. More...
 

Detailed Description

Class that represents the state

Constructor & Destructor Documentation

◆ State()

State ( ArborFSMInternal  stateMachine,
int  nodeID,
bool  resident 
)

State constructor

Parameters
stateMachineStateMachine with this node
nodeIDNode ID
residentResident state

Please use the ArborFSMInternal.CreateState(bool) state creating.

Member Function Documentation

◆ AddBehaviour() [1/2]

void AddBehaviour ( StateBehaviour  behaviour)

Adds the behaviour.

Parameters
behaviourAdd StateBehaviour

◆ AddBehaviour() [2/2]

StateBehaviour AddBehaviour ( System.Type  type)

Adds the behaviour.

Parameters
typeType of add StateBehaviour
Returns
Added StateBehaviour

◆ AddBehaviour< T >()

T AddBehaviour< T > ( )

Adds the behaviour.

Template Parameters
TType of add StateBehaviour
Returns
Added StateBehaviour
Type Constraints
T :StateBehaviour 

◆ Contains()

bool Contains ( StateBehaviour  behaviour)

Whether StateBehaviour are included.

Parameters
behaviourJudges StateBehaviour.
Returns
Whether included are.

◆ DestroyBehaviour()

void DestroyBehaviour ( Object  behaviourObj)

Destroy StateBehaviour

Parameters
behaviourObjThe StateBehavior you want to destroy.

◆ DestroyBehaviourAt()

void DestroyBehaviourAt ( int  behaviourIndex)

Destroy StateBehaviour

Parameters
behaviourIndexIndex of StateBehaviour you want to destroy.

◆ DestroyBehaviours()

void DestroyBehaviours ( )

For internal.

◆ DisconnectState()

void DisconnectState ( int  stateID)

For internal.

◆ GetBehaviour()

StateBehaviour GetBehaviour ( System.Type  type)

Gets the behaviour.

Parameters
typeType of you want to get StateBehaviour.
Returns
Found StateBehaviour. Or null if it is not.

◆ GetBehaviour< T >()

T GetBehaviour< T > ( )

Gets the behaviour.

Template Parameters
TType of you want to get StateBehaviour.
Returns
Found StateBehaviour. Or null if it is not.
Type Constraints
T :StateBehaviour 

◆ GetBehaviourFromIndex()

StateBehaviour GetBehaviourFromIndex ( int  index)

Get StateBehavior from index.

Parameters
indexIndex
Returns
StateBehaviour

◆ GetBehaviourObjectFromIndex()

Object GetBehaviourObjectFromIndex ( int  index)

Get Object of StateBehavior from index.

Parameters
indexIndex
Returns
Object

◆ GetBehaviours()

StateBehaviour [] GetBehaviours ( System.Type  type)

Gets the behaviours.

Parameters
typeType of you want to get StateBehaviour.
Returns
Array of found StateBehaviour.

◆ GetBehaviours< T >()

T [] GetBehaviours< T > ( )

Gets the behaviours.

Template Parameters
TType of you want to get StateBehaviour.
Returns
Array of found StateBehaviour.
Type Constraints
T :StateBehaviour 

◆ GetName()

override string GetName ( )
virtual

Get node name.

Returns
Node name

Reimplemented from Node.

◆ IndexOfBehaviour()

int IndexOfBehaviour ( Object  behaviourObj)

Return index of StateBehaviour.

Parameters
behaviourObjThe StateBehaviour to locate in the State.
Returns
Returns an index if found, -1 otherwise.

◆ InsertBehaviour() [1/2]

void InsertBehaviour ( int  index,
StateBehaviour  behaviour 
)

Insert the behaviour.

Parameters
indexInsertion destination index
behaviourInsert StateBehaviour

◆ InsertBehaviour() [2/2]

StateBehaviour InsertBehaviour ( int  index,
System.Type  type 
)

Insert the behaviour.

Parameters
indexInsertion destination index
typeType of add StateBehaviour
Returns
Inserted StateBehaviour

◆ InsertBehaviour< T >()

T InsertBehaviour< T > ( int  index)

Adds the behaviour.

Template Parameters
TType of insert StateBehaviour
Parameters
indexInsertion destination index
Returns
Inserted StateBehaviour
Type Constraints
T :StateBehaviour 

◆ IsContainsBehaviour()

override bool IsContainsBehaviour ( NodeBehaviour  behaviour)
virtual

Check if it contains NodeBehaviour.

Parameters
behaviourCheck NodeBehaviour
Returns
Returns true if it contains NodeBehaviour.

Reimplemented from Node.

◆ LateUpdateBehaviours()

void LateUpdateBehaviours ( )

For internal.

◆ MoveBehaviour()

void MoveBehaviour ( int  fromIndex,
State  toState,
int  toIndex 
)

Move the order of StateBehaviour.

Parameters
fromIndexThe moving want index.
toStateThe destination State.
toIndexThe destination index.

◆ OnGraphChanged()

override void OnGraphChanged ( )
protectedvirtual

Called when the NodeGraph to which the Node belongs has changed.

Reimplemented from Node.

◆ RemoveBehaviour()

void RemoveBehaviour ( Object  behaviourObj)

I want to remove the StateBehaviour.

For instance is not deleted, that you use the StateBehaviour.Destroy.

Parameters
behaviourObjStateBehaviour you want to remove.

◆ RemoveBehaviourAt()

void RemoveBehaviourAt ( int  behaviourIndex)

I want to remove the StateBehaviour.

For instance is not deleted, that you use the StateBehaviour.Destroy.

Parameters
behaviourIndexIndex of StateBehaviour to remove.

◆ SendTrigger()

void SendTrigger ( string  message)

Send a trigger message.

StateBehaviour.OnStateTrigger is called.

Parameters
messageMessage to be sent

◆ SetBehaviour()

void SetBehaviour ( int  index,
StateBehaviour  behaviour 
)

Set StateBehaviour.

Parameters
indexIndex
behaviourStateBehaviour

Note that the original StateBehaviour does not Destroy. If you want to add StateBehaviour, please use AddBehaviour. If you want to do Destroy please use DestroyBehaviour.

◆ SwapBehaviour()

void SwapBehaviour ( int  fromIndex,
int  toIndex 
)

Swap the order of StateBehaviour.

Parameters
fromIndexThe swapping want index.
toIndexExchange destination index.

◆ UpdateBehaviours()

void UpdateBehaviours ( )

For internal.

Member Data Documentation

◆ name

string name = "New State"

The name of the state.

Property Documentation

◆ behaviourCount

int behaviourCount
get

Get a count of Behavior.

◆ behaviours

StateBehaviour [] behaviours
get

Deprecated.

Use behaviourCount and GetBehaviourFromIndex.

◆ breakPoint

bool breakPoint
getset

Break point.

When this property is true, the editor is in a pause state at the timing of entering the state.

◆ resident

bool resident
get

Gets a value indicating whether this State is resident.

◆ stateID

int stateID
get

Gets the state identifier.

◆ stateMachine

ArborFSMInternal stateMachine
get

Gets the state machine.

◆ transitionCount

uint transitionCount
getset

Transition count.