Add/Get name for nodes in behaviour tree
This commit is contained in:
@@ -31,7 +31,8 @@ bool init(int *game) {
|
||||
BzBTNode *seq = bzBTCompSequence(nodePool, node, false);
|
||||
|
||||
bzBTDecorDelay(nodePool, seq, 1.0f);
|
||||
bzBTAction(nodePool, seq, printAction, "printAction");
|
||||
node = bzBTAction(nodePool, seq, printAction);
|
||||
bzBTNodeSetName(node,"printAction");
|
||||
|
||||
agentState = bzBTCreateState(&(BzBTStateDesc) {
|
||||
.root = printBT,
|
||||
@@ -76,7 +77,7 @@ void igRenderBTNode(const BzBTNode *node, const BzBTNodeState *state, bool sameL
|
||||
break;
|
||||
case BZ_BT_ACTION:
|
||||
snprintf(extraInfo, sizeof(extraInfo), " (%s:%p)",
|
||||
bzBTActionGetName(node),
|
||||
bzBTNodeGetName(node) ? bzBTNodeGetName(node) : "?",
|
||||
bzBTActionGetFn(node));
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user