Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Accessing the blackboard in the Constructor of TreeNode #33

Closed
@mjeronimo

Description

@mjeronimo

I'm using generation of the BT from an XML document. Also using the blackboard to share some data between nodes. When BT nodes are created with buildTreeFromText, the blackboard is not yet available to nodes in their constructor (since it is not set yet on the node). Therefore, in the tick() override, I have to check if this is the first time tick() has been called so I can get/set data intializing data from the blackboard after construction. Perhaps the library itself should have an onInit() function, in addition to tick() and halt(). The derived classes could override this method and know that the blackboard is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions