Vixen
caa30e12
csharp
public readonly record struct BehaviorContext

What a decorator or a service is handed: the agent, its tree, and which node it is on.

Read the guide page for this →

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 Agent

    Everything an action would get — the world, the entity, the blackboard, the clock.

  • public BehaviorTreeInstance Tree

    The running instance, for the few nodes that need to reach it.

  • public int Node

    The node this attachment belongs to.

  • public Blackboard Blackboard

    The blackboard the agent is thinking with.

  • public float Now

    Seconds 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