Blackboard Event
v4.0
Blackboard Events
public string topic; // May often be used to describe the gameUid -- i.e. "ItemObject" or "Stat" or something else you've created
public string gameUid; // Unique in-game identifier of the obj
public string status; // Describes the event that has occurred to the topic
public object obj; // The object itself// Add an event to the Blackboard, with no object. All values can be null or empty.
blackboard.AddEvent(topic, gameUid, status, null);
// An example of receiving an event from the Blackboard
public override void ReceiveEvent(BlackboardEvent blackboardEvent)
{
// We only care about events we are handling, often defined by the string values in the event.
if (blackboardEvent.topic != topic
|| blackboardEvent.gameUid != gameUid
|| blackboardEvent.status != status)
return;
DoSomethingWith(blackboardEvent);
}Last updated