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

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

Inheritance diagram for StateBehaviour:
NodeBehaviour SetParameterBehaviourInternal SetParameterBehaviour

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...
 
AddBehaviour< T > ()
 Adds the behaviour. 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...
 
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, bool rebuild=false)
 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...
 
StateprevTransitionState [get]
 Prev state More...
 
StatenextTransitionState [get]
 Next state More...
 
int stateLinkCount [get]
 Count of StateLink. More...
 
bool isCalledActivate [get]
 Whether the activation callback was made 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 :

Member Function Documentation

◆ AddBehaviour()

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 

◆ Destroy()

void Destroy ( )

Destroys this instance.

◆ 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 

◆ 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 

◆ GetStateLink()

StateLink GetStateLink ( int  index)

Return StateLink of index.

Parameters
indexIndex of StateLink
Returns
StateLink

◆ OnInitializeEnabled()

sealed override void OnInitializeEnabled ( )
protectedvirtual

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].

Reimplemented in SetParameterBehaviourInternal.

◆ OnStateLateUpdate()

virtual void OnStateLateUpdate ( )
virtual

LateUpdate for State.

Every frame, called after all updates.

Reimplemented in SetParameterBehaviourInternal.

◆ OnStateTrigger()

virtual void OnStateTrigger ( string  message)
virtual

Called from SendTrigger.

Parameters
messageMessage

◆ OnStateUpdate()

virtual void OnStateUpdate ( )
virtual

Update of State.

It is called every frame.

Reimplemented in SetParameterBehaviourInternal.

◆ 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
nextStateIDState ID for the transition destination.
Returns
Whether or not the transition

◆ Transition() [2/9]

bool Transition ( int  nextStateID,
bool  immediateTransition 
)

State transition

Parameters
nextStateIDState ID for the transition destination.
immediateTransitionWhether 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
nextStateIDState ID for the transition destination.
transitionTimingTransition 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
nextStateDestination state.
Returns
Whether or not the transition

◆ Transition() [5/9]

bool Transition ( State  nextState,
bool  immediateTransition 
)

State transition

Parameters
nextStateDestination state.
immediateTransitionWhether 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
nextStateDestination state.
transitionTimingTransition 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
nextStateLinkThe destination of transition.
Returns
Whether or not the transition

◆ Transition() [8/9]

bool Transition ( StateLink  nextStateLink,
bool  immediateTransition 
)

State transition

Parameters
nextStateLinkThe destination of transition.
immediateTransitionWhether 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
nextStateLinkThe destination of transition.
transitionTimingTransition timing.
Returns
Whether or not the transition

Member Data Documentation

◆ expanded

bool expanded = true

Expanded on ArborEditorWindow.

Property Documentation

◆ behaviourEnabled

bool behaviourEnabled
getset

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

true if [behaviour enabled]; otherwise, false.

◆ isCalledActivate

bool isCalledActivate
get

Whether the activation callback was made

◆ 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.