private AStarData GetData(IMapNode node) { if (!_dataDict.TryGetValue(node, out var data)) { data = new AStarData(); _dataDict.Add(node, data); } return(data); }
/// <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); }