Arbor 3: FSM & BT Graph Editor 3.6.8

Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
StateBehaviour Class Reference

Class that defines the behavior of the State. More...

Inheritance diagram for StateBehaviour:

## Public Member Functions
virtual void | OnStateAwake ()
| Called when [state enter first]. More...
virtual void | OnStateBegin ()
| Called when [state enter]. More...
virtual void | OnStateUpdate ()
| Update of State. More...
virtual void | OnStateLateUpdate ()
| LateUpdate for State. More...
virtual void | OnStateEnd ()
| Called when [state exit]. More...
virtual void | OnStateTrigger (string message)
| Called from SendTrigger. More...
bool | Transition (int nextStateID, TransitionTiming transitionTiming)
| State transition More...
bool | Transition (int nextStateID, bool immediateTransition)
| State transition More...
bool | Transition (int nextStateID)
| State transition. More...
bool | Transition (State nextState, TransitionTiming transitionTiming)
| State transition More...
bool | Transition (State nextState, bool immediateTransition)
| State transition More...
bool | Transition (State nextState)
| State transition. More...
bool | Transition (StateLink nextStateLink, TransitionTiming transitionTiming)
| State transition More...
bool | Transition (StateLink nextStateLink, bool immediateTransition)
| State transition More...
bool | Transition (StateLink nextStateLink)
| State transition. More...
StateBehaviour | AddBehaviour (System.Type type)
| Adds the behaviour. More...
T | AddBehaviour< T > ()
| Adds the behaviour. More...
StateBehaviour | GetBehaviour (System.Type type)
| Gets the behaviour. More...
T | GetBehaviour< T > ()
| Gets the behaviour. More...
StateBehaviour[] | GetBehaviours (System.Type type)
| Gets the behaviours. More...
T[] | GetBehaviours< T > ()
| Gets the behaviours. More...
void | Destroy ()
| Destroys this instance. More...
StateLink | GetStateLink (int index)
| Return StateLink of index. More...
void | RebuildStateLinkCache ()
| Rebuild StateLink's cache. More...
Public Member Functions inherited from NodeBehaviour
void | RebuildFields ()
| For internal. More...
DataSlotField | GetDataSlotField (int index)
| Get DataSlotField. More...
DataSlotField | GetCalculatorSlotField (int index)
| Get DataSlotField. More...
DataSlotField | GetDataSlotField (DataSlot slot)
| Get DataSlotField. More...
DataSlotField | GetCalculatorSlotField (DataSlot slot)
| Get DataSlotField. More...
void | RebuildDataSlotFields ()
| Rebuild the DataSlotField. More...
void | RebuildCalculatorSlotFields ()
| Rebuild the DataSlotField. More...
void | Initialize (NodeGraph nodeGraph, int nodeID)
| For Editor. More...
void | UpdateDataLink ()
| Manually update DataLink values. More...

## Public Attributes
bool | expanded = true
| Expanded on ArborEditorWindow. More...

## Protected Member Functions
sealed override void | OnInitializeEnabled ()
| Called to perform enabled initialization. More...
Protected Member Functions inherited from NodeBehaviour
virtual void | OnValidate ()
| See MonoBehaviour.OnValidate. More...
virtual void | OnCreated ()
| Raises the created event. More...
virtual void | OnPreDestroy ()
| Raises the pre destroy event. More...
virtual void | OnGraphPause ()
| This function is called when the graph is paused. More...
virtual void | OnGraphResume ()
| This function is called when the graph resumes. More...
virtual void | OnGraphStop ()
| This function is called when the graph stops. More...

## Properties
ArborFSMInternal | stateMachine`[get]`
| Gets the state machine. More...
State | state`[get]`
| Get the State. More...
int | stateID`[get]`
| Gets the state identifier. More...
bool | behaviourEnabled`[get, set]`
| Gets or sets a value indicating whether [behaviour enabled]. More...
State? | prevTransitionState`[get]`
| Prev state More...
State? | nextTransitionState`[get]`
| Next state More...
int | stateLinkCount`[get]`
| Count of StateLink. More...
Properties inherited from NodeBehaviour
NodeGraph | nodeGraph`[get]`
| Gets the NodeGraph. More...
int | nodeID`[get]`
| Gets the node identifier. More...
Node | node`[get]`
| Get the Node. More...
int | dataSlotFieldCount`[get]`
| Number of DataSlotField More...
int | calculatorSlotFieldCount`[get]`
| Number of DataSlotField More...

## Additional Inherited Members
Static Public Member Functions inherited from NodeBehaviour
static NodeBehaviour | CreateNodeBehaviour (Node node, System.Type type, bool duplicate=false)
| For Editor. More...
static Type | CreateNodeBehaviour< Type > (Node node, bool duplicate=false)
| For Editor. More...
static void | Destroy (NodeBehaviour behaviour)
| Destroy NodeBehaviour. More...

## Detailed Description

Class that defines the behavior of the State.

Inherited and to use.

Available Attributes :

- AddBehaviourMenu
- HideBehaviour
- BehaviourTitle
- BehaviourHelp

## Member Function Documentation

## ◆ AddBehaviour()

StateBehaviour AddBehaviour | ( | System.Type | type | ) |

Adds the behaviour.

Parameters

  type | Type of add StateBehaviour

Returns
  Added StateBehaviour

## ◆ AddBehaviour< T >()

T AddBehaviour< T > | ( |  | ) |

Adds the behaviour.

Template Parameters

  T | Type of add StateBehaviour

Returns
  Added StateBehaviour

Type Constraints

  T | : | StateBehaviour |

## ◆ Destroy()

void Destroy | ( |  | ) |

Destroys this instance.

## ◆ GetBehaviour()

StateBehaviour GetBehaviour | ( | System.Type | type | ) |

Gets the behaviour.

Parameters

  type | Type 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

  T | Type of you want to get StateBehaviour.

Returns
  Found StateBehaviour. Or null if it is not.

Type Constraints

  T | : | StateBehaviour |

## ◆ GetBehaviours()

StateBehaviour [] GetBehaviours | ( | System.Type | type | ) |

Gets the behaviours.

Parameters

  type | Type of you want to get StateBehaviour.

Returns
  Array of found StateBehaviour.

## ◆ GetBehaviours< T >()

T [] GetBehaviours< T > | ( |  | ) |

Gets the behaviours.

Template Parameters

  T | Type of you want to get StateBehaviour.

Returns
  Array of found StateBehaviour.

Type Constraints

  T | : | StateBehaviour |

## ◆ GetStateLink()

StateLink GetStateLink | ( | int | index | ) |

Return StateLink of index.

Parameters

  index | Index of StateLink

Returns
  StateLink

## ◆ OnInitializeEnabled()

sealed override void OnInitializeEnabled | ( |  | ) |
| protected virtual

Called to perform enabled initialization.

Reimplemented from NodeBehaviour.

## ◆ OnStateAwake()

virtual void OnStateAwake | ( |  | ) |
| virtual

Called when [state enter first].

## ◆ OnStateBegin()

virtual void OnStateBegin | ( |  | ) |
| virtual

Called when [state enter].

Reimplemented in SetParameterBehaviourInternal.

## ◆ OnStateEnd()

virtual void OnStateEnd | ( |  | ) |
| virtual

Called when [state exit].

## ◆ OnStateLateUpdate()

virtual void OnStateLateUpdate | ( |  | ) |
| virtual

LateUpdate for State.

Every frame, called after all updates.

## ◆ OnStateTrigger()

virtual void OnStateTrigger | ( | string | message | ) |
| virtual

Called from SendTrigger.

Parameters

  message | Message

## ◆ OnStateUpdate()

virtual void OnStateUpdate | ( |  | ) |
| virtual

Update of State.

It is called every frame.

## ◆ RebuildStateLinkCache()

void RebuildStateLinkCache | ( |  | ) |

Rebuild StateLink's cache.

## ◆ Transition() [1/9]

bool Transition | ( | int | nextStateID | ) |

State transition.

Timing to actually transition current frame last (when LateUpdate).

Parameters

  nextStateID | State ID for the transition destination.

Returns
  Whether or not the transition

## ◆ Transition() [2/9]

bool Transition | ( | int | nextStateID,
|  | bool | immediateTransition
| ) |  |

State transition

Parameters

  nextStateID | State ID for the transition destination.
  immediateTransition | Whether or not to transition immediately. If false I will transition to the end of the current frame (when LateUpdate).

Returns
  Whether or not the transition

## ◆ Transition() [3/9]

bool Transition | ( | int | nextStateID,
|  | TransitionTiming | transitionTiming
| ) |  |

State transition

Parameters

  nextStateID | State ID for the transition destination.
  transitionTiming | Transition timing.

Returns
  Whether or not the transition

## ◆ Transition() [4/9]

bool Transition | ( | State | nextState | ) |

State transition.

Timing to actually transition current frame last (when LateUpdate).

Parameters

  nextState | Destination state.

Returns
  Whether or not the transition

## ◆ Transition() [5/9]

bool Transition | ( | State | nextState,
|  | bool | immediateTransition
| ) |  |

State transition

Parameters

  nextState | Destination state.
  immediateTransition | Whether or not to transition immediately. If false I will transition to the end of the current frame (when LateUpdate).

Returns
  Whether or not the transition

## ◆ Transition() [6/9]

bool Transition | ( | State | nextState,
|  | TransitionTiming | transitionTiming
| ) |  |

State transition

Parameters

  nextState | Destination state.
  transitionTiming | Transition timing.

Returns
  Whether or not the transition

## ◆ Transition() [7/9]

bool Transition | ( | StateLink | nextStateLink | ) |

State transition.

Timing to actually transition current frame last (when LateUpdate).

Parameters

  nextStateLink | The destination of transition.

Returns
  Whether or not the transition

## ◆ Transition() [8/9]

bool Transition | ( | StateLink | nextStateLink,
|  | bool | immediateTransition
| ) |  |

State transition

Parameters

  nextStateLink | The destination of transition.
  immediateTransition | Whether or not to transition immediately. If false I will transition to the end of the current frame (when LateUpdate).

Returns
  Whether or not the transition

## ◆ Transition() [9/9]

bool Transition | ( | StateLink | nextStateLink,
|  | TransitionTiming | transitionTiming
| ) |  |

State transition

Parameters

  nextStateLink | The destination of transition.
  transitionTiming | Transition timing.

Returns
  Whether or not the transition

## Member Data Documentation

## ◆ expanded

bool expanded = true

Expanded on ArborEditorWindow.

## Property Documentation

## ◆ behaviourEnabled

bool behaviourEnabled
| get set

Gets or sets a value indicating whether [behaviour enabled].

`true` if [behaviour enabled]; otherwise, `false`.

## ◆ nextTransitionState

State? nextTransitionState
| get

Next state

## ◆ prevTransitionState

State? prevTransitionState
| get

Prev state

## ◆ state

State state
| get

Get the State.

## ◆ stateID

int stateID
| get

Gets the state identifier.

## ◆ stateLinkCount

int stateLinkCount
| get

Count of StateLink.

## ◆ stateMachine

ArborFSMInternal stateMachine
| get

Gets the state machine.