public void AddWay(int a, int b) { double dist = distance(Nodes[a], Nodes[b]); Nodacoter ab = new Nodacoter(); ab.id = b; ab.distance = dist; Nodes[a].NodeProches.Add(ab); Nodacoter ba = new Nodacoter(); ba.id = a; ba.distance = dist; Nodes[b].NodeProches.Add(ba); }
int IComparable.CompareTo(object obj) { List <Node> Nodes = SomeSettings.NavMesh.Nodes; Nodacoter face = (Nodacoter)obj; if (Nodes[id].DejaPasser < Nodes[face.id].DejaPasser) { return(-1); } else if (Nodes[id].DejaPasser > Nodes[face.id].DejaPasser) { return(1); } else { return(0); } }