csharp
public readonly record struct BehaviorContextWhat a decorator or a service is handed: the agent, its tree, and which node it is on.
Remarks
A struct passed by in. It is AgentContext plus the two things an attachment needs and an action does not — which is also why a task takes the smaller one: a task is an IAgentAction so that the same object serves a tree, a utility set and a GOAP plan, and it cannot ask for something only one of the three can give it.
Fields and properties (5)
public AgentContext AgentEverything an action would get — the world, the entity, the blackboard, the clock.
public BehaviorTreeInstance TreeThe running instance, for the few nodes that need to reach it.
public int NodeThe node this attachment belongs to.
public Blackboard BlackboardThe blackboard the agent is thinking with.
public float NowSeconds since the world started.
Methods (1)
public BehaviorContext(AgentContext Agent, BehaviorTreeInstance Tree, int Node)What a decorator or a service is handed: the agent, its tree, and which node it is on.
Used by (29)
- AbortsNothingDecoratorVixen.Ai.Tests
- BehaviorDecoratorVixen.Ai
- BehaviorServiceVixen.Ai
- BehaviorTreeInstanceVixen.Ai
- BlackboardDecoratorVixen.Ai
- CompareEntriesDecoratorVixen.Ai
- CompositeDecoratorVixen.Ai
- ConditionalLoopDecoratorVixen.Ai
- ConeDecoratorVixen.Ai
- CooldownDecoratorVixen.Ai
- CountingDecoratorVixen.Ai.Tests
- DefaultFocusServiceVixen.Ai.Nodes
- DoesPathExistDecoratorVixen.Ai.Nodes
- DoesPathExistTestsVixen.Ai.Nodes.Tests
- ForceFailureDecoratorVixen.Ai
- ForceSuccessDecoratorVixen.Ai
- InverterDecoratorVixen.Ai
- IsAtLocationDecoratorVixen.Ai
- LoopDecoratorVixen.Ai
- NearestPerceivedServiceVixen.Ai.Perception
- NoopServiceVixen.Ai.Tests
- PerceivedTargetDecoratorVixen.Ai.Perception
- RandomChanceDecoratorVixen.Ai
- RunQueryNodeTestsVixen.Ai.Nodes.Tests
- RunQueryServiceVixen.Ai.Nodes
- SetTagCooldownDecoratorVixen.Ai
- TagCooldownDecoratorVixen.Ai
- TimeLimitDecoratorVixen.Ai
- UpdateBlackboardServiceVixen.Ai