Esempio n. 1
0
        public void AddPlayer(BasePlayer i_Player)
        {
            i_Player.PlayerCollided += player_Collided;
            i_Player.StartPosition   = NextPosition;
            NextPosition            -= new Vector2(i_Player.Width, 0);
            m_LivesManager.AddPlayer(i_Player);
            m_ScoreManager.AddPlayer(i_Player);
            r_GameScreen.Add(i_Player);
            r_Players.Add(i_Player);
            PlayersCount++;
            r_SoundManager.AddSoundEmitter(i_Player);

            if (PlayersCount > m_GameSettings.PlayersCount)
            {
                i_Player.Visible = false;
                i_Player.Enabled = false;
            }

            setMouseControl(i_Player);
        }