Add initial Behavior simulation

This commit is contained in:
Wojtek Figat
2023-08-17 15:26:31 +02:00
parent d1e2d6699e
commit c18625e017
10 changed files with 444 additions and 10 deletions

View File

@@ -36,6 +36,12 @@ bool BehaviorTreeGraph::Load(ReadStream* stream, bool loadMeta)
}
}
}
if (node.Instance)
{
// Count total states memory size
node.Instance->_memoryOffset = NodesStatesSize;
NodesStatesSize += node.Instance->GetStateSize();
}
}
return false;
@@ -46,6 +52,7 @@ void BehaviorTreeGraph::Clear()
VisjectGraph<BehaviorTreeGraphNode>::Clear();
Root = nullptr;
NodesStatesSize = 0;
}
bool BehaviorTreeGraph::onNodeLoaded(Node* n)