public List<Player> GetAlliesInLobby()
        {
            List<Player> allies = new List<Player>();

            if (m_isInLobby)
            {
                for (int playerPosition = 1; playerPosition <= 5; playerPosition++)
                {
                    var ally = new Player();

                    ally.Position = playerPosition;
                    ally.Name = GetLobbyPlayerName(playerPosition);

                    allies.Add(ally);
                }
            }

            return allies;
        }
Example #2
0
 public PlayerEventArgs(Player player)
 {
     Player = player;
 }
        private void SetPlayer(Player player)
        {
            var handler = SetPlayerHandler;

            if (handler != null)
            {
                handler(this, new PlayerEventArgs(player));
            }
        }
Example #4
0
        private void SetPlayer(Player player)
        {
            Controls.PlayerUserControl playerUserControl;
            switch (player.Position)
            {
                case 1:
                    playerUserControl = PlayerUserControl1;
                    break;
                case 2:
                    playerUserControl = PlayerUserControl2;
                    break;
                case 3:
                    playerUserControl = PlayerUserControl3;
                    break;
                case 4:
                    playerUserControl = PlayerUserControl4;
                    break;
                case 5:
                    playerUserControl = PlayerUserControl5;
                    break;
                default:
                    playerUserControl = null;
                    break;
            }

            if (playerUserControl != null)
            {
                playerUserControl.PlayerName = player.Name;
                playerUserControl.PlayerTier = player.Tier;
                playerUserControl.PlayerDivision = player.Division;
                playerUserControl.PlayerLeaguePoints = player.LeaguePoints;
                playerUserControl.PlayerWins = player.Wins;
                playerUserControl.PlayerMatchHistory = player.MatchHistory.GetLobbyDisplayString();
            }
        }