Esempio n. 1
0
        public void SendIntoGame(Player _player)
        {
            player = _player;

            foreach (Client c in Server.clients.Values)
            {
                if (c.player != null)
                {
                    if (c.id != id)
                    {
                        ServerSend.SpawnPlayer(id, c.player);
                    }
                }
            }

            foreach (Client c in Server.clients.Values)
            {
                if (c.player != null)
                {
                    ServerSend.SpawnPlayer(c.id, player);
                }
            }
        }
Esempio n. 2
0
        public void SendIntoGame(string _playerName)
        {
            player = new Player(id, _playerName, Vector3.Zero);

            foreach (Client c in Server.clients.Values)
            {
                if (c.player != null)
                {
                    if (c.id != id)
                    {
                        ServerSend.SpawnPlayer(id, c.player);
                    }
                }
            }

            foreach (Client c in Server.clients.Values)
            {
                if (c.player != null)
                {
                    ServerSend.SpawnPlayer(c.id, player);
                }
            }
        }
Esempio n. 3
0
 public void Connect(IPEndPoint endPoint)
 {
     EndPoint = endPoint;
     ServerSend.UdpTest(_id);
 }