Example #1
0
File: AStar.cs Project: tgspn/Zilon
        private AStarData GetData(IMapNode node)
        {
            if (!_dataDict.TryGetValue(node, out var data))
            {
                data = new AStarData();
                _dataDict.Add(node, data);
            }

            return(data);
        }
Example #2
0
 /// <summary>
 /// Adds a INode to the SortedList.
 /// </summary>
 /// <param name="sortedList">SortedList to add the node to.</param>
 /// <param name="node">Node to add to the sortedList.</param>
 /// <param name="data"> Данные узла для алгоритма. </param>
 internal static void Add(this SortedList <int, IMapNode> sortedList, IMapNode node, AStarData data)
 {
     sortedList.Add(data.TotalCost, node);
 }