Пример #1
0
 public Player(GamePoint _position,int _radius,string _name,int _ID)
 {
     currentSpeed = new GameDPoint(0, 0);
     acceleration = new GameDPoint(0, 0);
     position = _position;
     radius = _radius;
     name = _name;
     ID = _ID;
 }
Пример #2
0
        static Arena createArena(string str,int ID)
        {
            Arena cArena = new Arena();
            cArena.arenaSize = new GamePoint(1024, 768);
            string[] space = str.Split(';');
            string[] bots = space[0].Split(' ');
            int t = 0;
            for (int i = 0; i < Bots.Count; i++)
            {
                string name = bots[t];
                int VSID = Convert.ToInt32( bots[t + 1]);
                GamePoint p = new GamePoint(Convert.ToInt32( bots[t + 2]),Convert.ToInt32( bots[t + 3]));
                GameDPoint s = new GameDPoint(Convert.ToDouble(bots[t + 4]),Convert.ToDouble(bots[t + 5]));
                int r = Convert.ToInt32( bots[t + 6]);

                if (VSID == Bots[i].VSID)
                {
                    cArena.Me = new ArenaPlayer(s, p, r);
                }
                else
                {
                    cArena.Players.Add(new ArenaPlayer(s, p, r));
                }
                t += 7;
            }

            return cArena;
        }
Пример #3
0
 public ArenaPlayer(GameDPoint Speed, GamePoint Position, int Radius)
 {
     speed = Speed;
     position = Position;
     radius = Radius;
 }