예제 #1
0
        public PlayScreen(Game i_Game, GameState i_GameState = null) : base(i_Game)
        {
            Background background = new Background(this.Game, this);

            m_GameSettings = (this.Game.Services.GetService(typeof(IGameSettings)) as SpaceInvadersSettings);

            if (m_GameSettings == null)
            {
                m_GameSettings = new SpaceInvadersSettings(this.Game);
            }

            setGameState(i_GameState, m_GameSettings);

            createPlayersAndScoreManagers();
            m_Enemies                  = new EnemiesGroup(this.Game, this);
            m_Barriers                 = new Barriers(this.Game, this);
            m_MotherSpaceship          = new MotherShip(this.Game, this);
            m_MotherShipRandomNotifier = new RandomActionComponent();
            m_MotherShipRandomNotifier.RandomTimeAchieved += motherShipRandomNotifier_GoMotherSpaceship;
        }
예제 #2
0
 public void AddEnemyGroup(EnemiesGroup enemyGroup)
 {
     EnemiesGroupList.Add(enemyGroup);
     currentNumberOfEnemiesOnTheMap += enemyGroup.GetEnemiesCount();
 }