Polish up behaviour tree, add docs
This commit is contained in:
@@ -26,12 +26,12 @@ bool init(int *game) {
|
||||
// delay 1s
|
||||
// print "Hello, world!"
|
||||
printBT = bzBTMakeRoot(nodePool);
|
||||
BzBTNode *pseq = bzBTCompSelector(nodePool, printBT, true);
|
||||
BzBTNode *pseq = bzBTCompPSelector(nodePool, printBT);
|
||||
bzBTDecorDelay(nodePool, pseq, 2.0f);
|
||||
|
||||
BzBTNode *node = bzBTDecorRepeat(nodePool, pseq, 5);
|
||||
|
||||
BzBTNode *seq = bzBTCompSequence(nodePool, node, false);
|
||||
BzBTNode *seq = bzBTCompSequence(nodePool, node);
|
||||
|
||||
bzBTDecorDelay(nodePool, seq, 1.0f);
|
||||
node = bzBTAction(nodePool, seq, printAction);
|
||||
@@ -155,9 +155,9 @@ void igVisualizeBTState(const BzBTNode *node, const BzBTNodeState *state,
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
while (child) {
|
||||
if (hasSingleChild) igSameLine(0, 0);
|
||||
|
||||
Reference in New Issue
Block a user