Class BehaviorTreeDecorator
Base class for Behavior Tree node decorators. Decorators can implement conditional filtering or override node logic and execution flow.
Inheritance
System.Object
BehaviorTreeDecorator
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public abstract class BehaviorTreeDecorator : BehaviorTreeNode, ISerializable
Constructors
BehaviorTreeDecorator()
Initializes a new instance of the BehaviorTreeDecorator.
Declaration
protected BehaviorTreeDecorator()
Methods
CanUpdate(BehaviorUpdateContext)
Checks if the node can be updated (eg. decorator can block it depending on the gameplay conditions or its state).
Declaration
[Unmanaged]
public virtual bool CanUpdate(BehaviorUpdateContext context)
Parameters
BehaviorUpdateContext
context
Behavior update context data. |
Returns
System.Boolean
True if can update, otherwise false to block it. |
PostUpdate(BehaviorUpdateContext, ref BehaviorUpdateResult)
Called after node update to post-process result or perform additional action.
Declaration
[Unmanaged]
public virtual void PostUpdate(BehaviorUpdateContext context, ref BehaviorUpdateResult result)
Parameters
BehaviorUpdateContext
context
Behavior update context data. |
BehaviorUpdateResult
result
The node update result. Can be modified by the decorator (eg. to force success). |