public sealed class PerceivedTargetDecoratorWhether this sense currently has anything, or has anything recent enough.
Remarks
doc 37 § Part 3's PerceivedTarget. It reads the perceived list rather than the blackboard — the list has the sense and the age on it and a key does not — but it observes a key, and that pairing is the whole trick: the binding writes the key when a pass changes what is perceived, the key's observers are what interrupt a branch, and this decorator is what then answers the finer question the key could not carry.
⚠ An Aborts other than None without a bound key does nothing, and BehaviorTreeCompiler says so rather than letting it ship. A perceived list changing is not an event the tree can see; only a blackboard write is.
Fields and properties (3)
public override ObserverAborts AbortsWhat this may interrupt when the keys it reads change.
public override ReadOnlySpan<BlackboardKey> ObservedKeysThe blackboard keys it reads.
public override bool ContinuousRe-tested every step, because a target walking out of a cone changes nothing on the blackboard until the next pass and the branch should not outlive the condition.
Methods (2)
public PerceivedTargetDecorator(PerceptionSystem system, SenseMask senses, BlackboardKey key, float maximumAge = 0, ObserverAborts aborts = None)Whether this sense currently has anything, or has anything recent enough.
public override bool Evaluate(in BehaviorContext context, ReadOnlySpan<byte> state)Whether the node may be entered, or may keep running.
Used by (1)
- PerceptionNodesVixen.Ai.Perception