public sealed class TargetLocationAgeBindingThe default triple: who, where they were, and how long ago.
Remarks
⚠ The target key stays set after the target is lost, and the age key is how a tree tells. Clearing it on losing sight would make "chase him" and "search where he was" two different branches reading two different keys, and the second one would need its own copy of the position and its own timer — which is the hand-written memory management this exists to remove. A branch that only wants a live target tests age < 0.5; a branch that wants to search tests age > 0.5; and both read one key.
The keys are optional individually. A game that only branches on "is there anything" binds the target and leaves the other two out, and pays for nothing it did not ask for.
⚠ Nullable rather than default for the optional two, because default(BlackboardKey) is index zero — a perfectly real key — and an omitted argument would silently bind the first key in the layout.
Fields and properties (1)
public SenseMask SensesWhich senses feed it.
Methods (2)
public TargetLocationAgeBinding(SenseMask senses, BlackboardKey target, BlackboardKey? location = null, BlackboardKey? age = null)The default triple: who, where they were, and how long ago.
public void Write(PerceivedTargets perceived, Blackboard blackboard, Vector3 listener, float now)Writes a pass's results.
Used by (3)
- BindingTestsVixen.Ai.Perception.Tests
- PatrolChaseGiveUpTestsVixen.Ai.Nodes.Tests
- VillageVixen.Ai.Nodes.Tests