(bb-assocer-in path value)
Returns a function that can be applied to a tree, associating the provided value to the specified path in its blackboard.
Returns a function that can be applied to a tree, associating the provided value to the specified path in its blackboard.
(bb-get ctx)
Returns the blackboard of this tree
Returns the blackboard of this tree
(bb-get-in ctx path)
Returns a value from the blackboard of this tree. The path parameter is like the one of get-in.
Returns a value from the blackboard of this tree. The path parameter is like the one of get-in.
(bb-getter)
Returns a function that can be applied to a tree, returning its blackboard.
Returns a function that can be applied to a tree, returning its blackboard.
(bb-getter-in path)
Returns a function that can be applied to a tree, returning the value stored at the specified path in its blackboard
Returns a function that can be applied to a tree, returning the value stored at the specified path in its blackboard
(bb-set ctx value)
Sets the whole blackboard of this tree in one go.
Sets the whole blackboard of this tree in one go.
(bb-setter value)
Returns a function that can be applied to a tree, setting the provided value as its new blackboard.
Returns a function that can be applied to a tree, setting the provided value as its new blackboard.
(bb-update ctx func & params)
Update the blackboard of this tree, applying the provided func with the blackboard as its first parameter and the params as the rest.
Update the blackboard of this tree, applying the provided func with the blackboard as its first parameter and the params as the rest.
(bb-update-in ctx path func & params)
Updates the blackboard of this tree, with the func and path specified.
Updates the blackboard of this tree, with the func and path specified.
(bb-updater func & params)
Returns a function that can be applied to a tree. It will update its blackboard with the provided function and arguments
Returns a function that can be applied to a tree. It will update its blackboard with the provided function and arguments
(bb-updater-in path func & params)
Returns a function that can be applied to a tree. It will update its blackboard at the provided path, with the provided funtion and arguments
Returns a function that can be applied to a tree. It will update its blackboard at the provided path, with the provided funtion and arguments
(extract-db ctx)
Extracts the database of this tree. It contains all the book-keeping transient data for the tree, as well as it blackboard. This is a O(1) operation.
Extracts the database of this tree. It contains all the book-keeping transient data for the tree, as well as it blackboard. This is a O(1) operation.
(get-events ctx)
Returns a vector of all the events that were raised during the last tick of the tree. Each event is a vector pair with the event name as its first element, and the event argument as its second element, or nil if there is none.
Returns a vector of all the events that were raised during the last tick of the tree. Each event is a vector pair with the event name as its first element, and the event argument as its second element, or nil if there is none.
(get-status ctx)
Returns the status of the root node of the tree
Returns the status of the root node of the tree
(get-var ctx name)
Returns the value a variable previously bound, for instance by the :bind node
Returns the value a variable previously bound, for instance by the :bind node
(hiccup->context hiccup)
(hiccup->context ctx hiccup)
Takes an hissup behavior tree definition and returns a behavior tree context, ready to be ticked.
Takes an hissup behavior tree definition and returns a behavior tree context, ready to be ticked.
(merge-db ctx db)
Merge the provided database with the tree. This is a O(1) operation.
Merge the provided database with the tree. This is a O(1) operation.
(send-event ctx name)
(send-event ctx name arg)
Sends an event to the tree, that can later be consumed by a :consume-event or :on-event node. An optional arg parameter can be sent along with it.
Sends an event to the tree, that can later be consumed by a :consume-event or :on-event node. An optional arg parameter can be sent along with it.
(tick ctx)
(tick ctx time)
Ticks the tree, going through all running and fresh nodes in a depth first manner. The optional time parameter specifies at which time (in milliseconds) the tick is supposed to be occuring. This time parameter is usefull for testing.
Ticks the tree, going through all running and fresh nodes in a depth first manner. The optional time parameter specifies at which time (in milliseconds) the tick is supposed to be occuring. This time parameter is usefull for testing.
(tick+ ctx duration)
This function is for testing purpose. It ticks the tree 'duration' milliseconds after it was last ticked.
This function is for testing purpose. It ticks the tree 'duration' milliseconds after it was last ticked.
(var-getter name)
Returns a function that can be applied to a tree, returning value of the variable with the provided name
Returns a function that can be applied to a tree, returning value of the variable with the provided name
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close