csharp
public interface IBlackboardObserverSomething that wants to know when a key changes.
Remarks
This is what makes an event-driven behaviour tree possible: a decorator with an observer registers on the keys it reads, and a write to one of them re-evaluates it. A tree whose world has not changed does nothing at all.
⚠ An observer is told, it does not act. A notification arrives during somebody else's write, which may well be the running task writing its own result — so the correct response is to enqueue work, never to abort, re-enter or tick anything. The stepper services what was enqueued at the top of the next step, when nothing is part-way. docs/plan/37 § D6 is the argument, and the one-frame latency it costs is stated in the guide rather than hidden.
Methods (1)
void OnBlackboardChanged(Blackboard blackboard, BlackboardKey key)The key changed.
Used by (5)
- BehaviorTreeInstanceVixen.Ai
- BlackboardVixen.Ai
- CountingObserverVixen.Ai.Tests
- DelegateObserverVixen.Ai.Tests
- ObserverSlotVixen.Ai