예제 #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);
                }
            }
        }
예제 #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);
                }
            }
        }