コード例 #1
0
 public void SearchInit()
 {
     ClearAllPath();
     isOver = false;
     TargetPath.Clear();
     TargetNode = nodes = getNewPathNode();
     searchStack.Clear();
     searchStack.Push(nodes);
     nodes[PathType.Forward] = getNewPathNode();
     nodes[PathType.Forward][PathType.Back] = nodes;
     lastNode = nodes[PathType.Forward];
     LastDir.Reset();
     LastPathDirValue.Reset();
     setCarNode(nodes);
     TurnBack  = false;
     WayLenght = true;
 }
コード例 #2
0
 public Bitmap Update()
 {
     Draw.Clear(Color.White);
     NodeList.Clear();
     DrawPathList(xpos, ypos, nodes);
     DrawTargetPath();
     foreach (CarInfo info in CarList)
     {
         updateCar(info);
     }
     //updateCar((int)(lastlenght*Scale));
     //DrawPath(xpos,ypos,nodes);
     //findDir.Rotate(PathType.Back);
     //DrawPath(nodes[PathType.Forward].x, nodes[PathType.Forward].y, nodes[PathType.Forward],PathType.Back);
     findDir.Reset();
     return(map);
 }