Ejemplo n.º 1
0
        private void SetupRawPath()
        {
            m_nextPathNodeID   = 0;
            m_navCellToNodeMap = new Dictionary <uint, PathNode>();
            m_nodeHeap         = new PathNodeHeap();

            PathNode pathNode =
                new PathNode(
                    (int)m_nextPathNodeID,
                    null,
                    (uint)m_startNavRef.NavCellIndex,
                    0,
                    ComputeHeuristicCostEstimate(m_startPosition, m_endPosition));

            m_nextPathNodeID++;
            m_totalNodesSearched = 0;

            m_nodeHeap.Push(pathNode);
            m_navCellToNodeMap[pathNode.NavCellIndex] = pathNode;

            m_state = eState.compute_raw_path;
        }
Ejemplo n.º 2
0
        private void SetupRawPath()
        {
            m_nextPathNodeID = 0;
            m_navCellToNodeMap = new Dictionary<uint, PathNode>();
            m_nodeHeap = new PathNodeHeap();

            PathNode pathNode =
                new PathNode(
                    (int)m_nextPathNodeID,
                    null,
                    (uint)m_startNavRef.NavCellIndex,
                    0,
                    ComputeHeuristicCostEstimate(m_startPosition, m_endPosition));

            m_nextPathNodeID++;
            m_totalNodesSearched = 0;

            m_nodeHeap.Push(pathNode);
            m_navCellToNodeMap[pathNode.NavCellIndex] = pathNode;

            m_state = eState.compute_raw_path;
        }