Refactor behaviour tree decorators
This commit is contained in:
@@ -117,6 +117,8 @@ void igVisualizeBTState(const BzBTNode *node, const BzBTNodeState *state, bool s
|
||||
void igRenderBT(BzBTState *state) {
|
||||
const BzBTNode *root = state->root;
|
||||
if (igBegin("BehaviourTree", NULL, 0)) {
|
||||
igText("NodeState pool: %d", bzObjectPoolGetNumFree(nodeStatePool));
|
||||
igSeparatorText("");
|
||||
igVisualizeBTState(root, state->_first, false, 0);
|
||||
}
|
||||
igEnd();
|
||||
@@ -126,6 +128,7 @@ void render(float dt, int *game) {
|
||||
ClearBackground(WHITE);
|
||||
|
||||
BzBTStatus status = bzBTExecute(&agentState, dt);
|
||||
assert(status != BZ_BT_ERROR);
|
||||
|
||||
rlImGuiBegin();
|
||||
igRenderBT(&agentState);
|
||||
|
||||
Reference in New Issue
Block a user