Пример #1
0
        public int CompareTo(object obj)
        {
            AStarNode node = obj as AStarNode;

            return(EstimatedCost.CompareTo(node.EstimatedCost));
        }
Пример #2
0
 public void Remove(AStarNode node)
 {
     mNodes.Remove(node);
     //Ensure the list is sorted
     mNodes.Sort();
 }
Пример #3
0
        private static float HeuristicEstimateCost(AStarNode curNode, AStarNode goalNode)
        {
            Vector3 vecCost = curNode.Position - goalNode.Position;

            return(vecCost.magnitude);
        }
Пример #4
0
 public void Push(AStarNode node)
 {
     mNodes.Add(node);
     mNodes.Sort();
 }