Polish up behaviour tree, add docs
This commit is contained in:
@@ -279,9 +279,9 @@ static void visualizeBTState(const BzBTNode *node, const BzBTNodeState *state, b
|
||||
igTextColored(color, "%s%*s%s%s%s", prefix, offset, "", bzBTNodeTypeToStr(type), extraInfo, postfix);
|
||||
|
||||
bool isComposite = type == BZ_BT_COMP_SELECTOR ||
|
||||
type == BZ_BT_COMP_P_SELECTOR ||
|
||||
type == BZ_BT_COMP_PSELECTOR ||
|
||||
type == BZ_BT_COMP_SEQUENCE ||
|
||||
type == BZ_BT_COMP_P_SEQUENCE;
|
||||
type == BZ_BT_COMP_PSEQUENCE;
|
||||
depth++;
|
||||
while (child) {
|
||||
if (hasSingleChild) igSameLine(0, 0);
|
||||
|
||||
@@ -260,11 +260,11 @@ bool init(void *userData) {
|
||||
|
||||
//node = bzBTDecorUntilFail(nodePool, root);
|
||||
|
||||
BzBTNode *collectSeq = bzBTCompSequence(nodePool, root, false);
|
||||
BzBTNode *collectSeq = bzBTCompSequence(nodePool, root);
|
||||
|
||||
BzBTNode *untilFail = bzBTDecorUntilFail(nodePool, collectSeq);
|
||||
{
|
||||
BzBTNode *untilSeq = bzBTCompSequence(nodePool, untilFail, false);
|
||||
BzBTNode *untilSeq = bzBTCompSequence(nodePool, untilFail);
|
||||
node = bzBTAction(nodePool, untilSeq, (BzBTActionFn) aiFindNextHarvestable);
|
||||
bzBTNodeSetName(node, "findNextHarvestable");
|
||||
node = bzBTAction(nodePool, untilSeq, (BzBTActionFn) aiMoveTo);
|
||||
|
||||
Reference in New Issue
Block a user