Class BehaviorTreeCooldownDecorator
Adds cooldown in between node executions. Blocks node execution for a given duration after last run.
Inheritance
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/AI/BehaviorTreeNodes.h
Syntax
public class BehaviorTreeCooldownDecorator : public BehaviorTreeDecorator
Methods
CanUpdate(const BehaviorUpdateContext& context)
Checks if the node can be updated (eg. decorator can block it depending on the gameplay conditions or its state).
Declaration
public virtual bool CanUpdate(const BehaviorUpdateContext& context) override
Parameters
BehaviorUpdateContext
context
Behavior update context data. |
Returns
bool
True if can update, otherwise false to block it. |
Overrides
GetStateSize()
Gets the node instance state size. A chunk of the valid memory is passed via InitState to setup that memory chunk (one per-behavior).
Declaration
public virtual int32 GetStateSize() const override
Returns
int32
|
Overrides
InitState(const BehaviorUpdateContext& context)
Initializes node instance state. Called when starting logic simulation for a given behavior. Call constructor of the state container.
Declaration
public virtual void InitState(const BehaviorUpdateContext& context) override
Parameters
BehaviorUpdateContext
context
Behavior update context data. |
Overrides
PostUpdate(const BehaviorUpdateContext& context, BehaviorUpdateResult& result)
Called after node update to post-process result or perform additional action.
Declaration
public virtual void PostUpdate(const BehaviorUpdateContext& context, BehaviorUpdateResult& result) override
Parameters
BehaviorUpdateContext
context
Behavior update context data. |
BehaviorUpdateResult
result
The node update result. Can be modified by the decorator (eg. to force success). |
Overrides
ReleaseState(const BehaviorUpdateContext& context)
Cleanups node instance state. Called when stopping logic simulation for a given behavior. Call destructor of the state container.
Declaration
public virtual void ReleaseState(const BehaviorUpdateContext& context) override
Parameters
BehaviorUpdateContext
context
Behavior update context data. |