public void OnNewPlayer(Player p) { if (InvokeRequired) { Invoke(new PlayerEventHandler(OnNewPlayer), p); return; } BindPlayers(_server.Players); }
/// <summary> /// Adds a new player to alliance. /// Fires a new player added event. /// </summary> /// <param name="player">Player to add.</param> public void AddPlayer(Player player) { Players.Add(player); if (OnPlayerAdded != null) { OnPlayerAdded.Invoke(player); } }