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

A class that defines decoration for composite nodes and action nodes. More...

Inheritance diagram for Decorator:
TreeNodeBehaviour NodeBehaviour

Public Types

enum  Condition { None, Success, Failure }
 The condition of the decorator More...
 

Public Member Functions

virtual bool HasConditionCheck ()
 It is judged whether Condition Check should be performed. 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...
 

Static Public Member Functions

static Decorator Create (Node node, System.Type type)
 Create Decorator More...
 
static Type Create< Type > (Node node)
 Create Decorator More...
 
- 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...
 

Protected Member Functions

virtual bool OnConditionCheck ()
 Perform ConditionCheck. More...
 
virtual bool OnFinishExecute (bool result)
 FinishExecute callback. More...
 
virtual bool OnRepeatCheck ()
 Callback to decide whether to repeat again when the self node finishes. More...
 
virtual bool OnRepeatCheck (bool nodeResult)
 Callback to decide whether to repeat again when the self node finishes. More...
 
- Protected Member Functions inherited from TreeNodeBehaviour
sealed override void OnInitializeEnabled ()
 Called to perform enabled initialization. More...
 
virtual void OnAwake ()
 This function is called when the own node becomes active for the first time. More...
 
virtual void OnStart ()
 This function is called when the own node becomes active. More...
 
virtual void OnAbort ()
 This function is called when the own node is aborted. More...
 
virtual void OnEnd ()
 This function is called when the own node ends. 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

bool behaviourEnabled [get, set]
 Gets or sets a value indicating whether [behaviour enabled]. More...
 
AbortFlags abortFlags [get]
 Abort flags More...
 
bool isRevaluation [get]
 It returns whether to reevaluate. More...
 
Condition currentCondition [get]
 Current condition More...
 
- Properties inherited from TreeNodeBehaviour
BehaviourTreeInternal behaviourTree [get]
 Gets the behaviour tree. More...
 
TreeNodeBase treeNode [get]
 Get the TreeNodeBase. 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

- Public Attributes inherited from TreeNodeBehaviour
bool expanded = true
 Expanded on ArborEditorWindow. More...
 

Detailed Description

A class that defines decoration for composite nodes and action nodes.

Inherit and use it.

Available Attributes :

Member Enumeration Documentation

◆ Condition

enum Condition
strong

The condition of the decorator

Enumerator
None 

No condition

Success 

Success

Failure 

Failure

Member Function Documentation

◆ Create()

static Decorator Create ( Node  node,
System.Type  type 
)
static

Create Decorator

Parameters
nodeNode
typeDecorator type
Returns
Created Decorator.

◆ Create< Type >()

static Type Create< Type > ( Node  node)
static

Create Decorator

Template Parameters
TypeDecorator type
Parameters
nodeNode
Returns
Created Decorator.
Type Constraints
Type :Decorator 

◆ HasConditionCheck()

virtual bool HasConditionCheck ( )
virtual

It is judged whether Condition Check should be performed.

It returns true by default. To invalidate, please override and return false.

Returns

◆ OnConditionCheck()

virtual bool OnConditionCheck ( )
protectedvirtual

Perform ConditionCheck.

Returns
Returns true if it matches the condition, false if it does not match.

◆ OnFinishExecute()

virtual bool OnFinishExecute ( bool  result)
protectedvirtual

FinishExecute callback.


You can change the result of the execution result.

Parameters
resultExecution result.
Returns
Changed result.

◆ OnRepeatCheck() [1/2]

virtual bool OnRepeatCheck ( )
protectedvirtual

Callback to decide whether to repeat again when the self node finishes.

Returns
Returns true if to repeat, false otherwise.

◆ OnRepeatCheck() [2/2]

virtual bool OnRepeatCheck ( bool  nodeResult)
protectedvirtual

Callback to decide whether to repeat again when the self node finishes.

Parameters
nodeResultNode processing result
Returns
Returns true if to repeat, false otherwise.

Property Documentation

◆ abortFlags

AbortFlags abortFlags
get

Abort flags

◆ behaviourEnabled

bool behaviourEnabled
getset

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

true if [behaviour enabled]; otherwise, false.

◆ currentCondition

Condition currentCondition
get

Current condition

◆ isRevaluation

bool isRevaluation
get

It returns whether to reevaluate.