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); } } }
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); } } }
public void Connect(IPEndPoint endPoint) { EndPoint = endPoint; ServerSend.UdpTest(_id); }