Liking cljdoc? Tell your friends :D

cark.behavior-tree.node-defs.on-event

The :on-event node acts in the same way as the :consume-event node, but it binds the event argument to a var and execute its child.

Parameters:

  • :event : A keyword, or keyword returning context function. The name of the event to be consumed.
  • :pick? : A context function with two parameters. first the tree context, then the event argument being considered. This acts as an additional filter when considering incoming events to be consumed. The event will be consumed if this function returns a truthy value.
  • :wait? : A boolean, or boolean returning context function. When true the node will stay :running until the event is consumed.
  • :bind-arg : the keyword name of the var to which the event argument will be bound.
The :on-event node acts in the same way as the :consume-event node, but it binds
the event argument to a var and execute its child.

Parameters:
- :event : A keyword, or keyword returning context function. The name of the event to be consumed.
- :pick? : A context function with two parameters. first the tree context, then the event argument being considered. This acts as an additional filter when considering incoming events to be consumed. The event will be consumed if this function returns a truthy value.
- :wait? : A boolean, or boolean returning context function. When true the node will stay :running until the event is consumed.
- :bind-arg : the keyword name of the var to which the event argument will be bound.
raw docstring

compile-nodeclj/s

(compile-node tree id tag params [child-id])
source

logclj/s

(log value)
source

registerclj/s

(register)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close