Exemple #1
0
        private void recreateBarrierList()
        {
            foreach (Barrier barrier in m_BarrierList)
            {
                barrier.Dispose();
            }

            this.Remove(m_BarrierList);
            m_BarrierList = new BarrierList(this.Game, Color.LightGreen);
            this.Add(m_BarrierList);
        }
Exemple #2
0
        public PlayScreen(Game i_Game)
            : base(i_Game)
        {
            GameManager      gameManager;
            ScreenBackground background = new ScreenBackground(i_Game, Color.DarkCyan, @"GameAssets\BG_Space01_1024x768");
            MotherShip       motherShip = new MotherShip(i_Game, Color.Red);

            gameManager              = this.Game.Services.GetService(typeof(IGameManager)) as GameManager;
            gameManager.LevelPassed += gameManager_LevelPassed;
            gameManager.GameOver    += gameManager_GameOver;
            m_EnemyMatrix            = new EnemyMatrix(i_Game);
            m_BarrierList            = new BarrierList(i_Game, Color.LightGreen);
            m_PauseScreen            = new PauseScreen(i_Game);
            this.Add(background);
            this.Add(m_EnemyMatrix);
            createPlayers(gameManager);
            this.Add(motherShip);
            this.Add(m_BarrierList);
        }