Пример #1
0
 /// <summary>
 /// Adds ZoneList to Elements
 /// </summary>
 /// <returns>The Elements object.</returns>
 public Elements AddZoneList(List <ZoneList> zoneLists)
 {
     foreach (var zoneList in zoneLists)
     {
         ZoneLists.Add(zoneList);
     }
     return(this);
 }
Пример #2
0
        public void TravelWalk(string city)
        {
            ZoneLists zones = new ZoneLists();

            float rotate = 0.04f;

            int end   = zones.Dun_Morogh_Map[city];
            int start = MoveToClosestNode(rotate);

            float Min_Distance = 2f;

            //   Cities c = cont.getCity(city);
            List <int> path = zones.Dun_Morogh.shortest_path(start, end);

            path.Reverse();

            foreach (int i in path)
            {
                Console.WriteLine(i);
            }

            Thread.Sleep(500);

            ThreadStart thread  = new ThreadStart(JumpThread.CallJump);
            Thread      cThread = new Thread(thread);

            cThread.Start();

            foreach (int i in path)
            {
                float distance = 0;

                while (true)
                {
                    distance = MoveToPoint(zones.Dm[i], Min_Distance, rotate);

                    if (distance <= Min_Distance)
                    {
                        break;
                    }
                }
            }

            cThread.Abort();
        }
Пример #3
0
 public Travel()
 {
     zones    = new ZoneLists();
     cont     = new Container();
     keyboard = new Keyboard();
 }