Ejemplo n.º 1
0
        public BehaviourIterator(BehaviourTree tree, int levelOffset)
        {
            this.tree = tree;

            // Since tree heights starts from zero, the stack needs to have treeHeight + 1 slots.
            int maxTraversalLength = this.tree.Height + 1;

            traversal           = new Utility.FixedSizeStack <int>(maxTraversalLength);
            requestedTraversals = new Queue <int>(maxTraversalLength);

            LevelOffset = levelOffset;
        }
Ejemplo n.º 2
0
 public TreeQueryIterator(int treeHeight)
 {
     // Since tree heights starts from zero, the stack needs to have treeHeight + 1 slots.
     _traversal = new Utility.FixedSizeStack <BehaviourNode>(treeHeight + 1);
 }