public SpaceInvadersGame()
        {
            graphics = new GraphicsDeviceManager(this);
            Services.AddService(typeof(GraphicsDeviceManager), graphics);
            Content.RootDirectory = "Content";
            this.IsMouseVisible = true;

            InputManager inputManager = new InputManager(this, 1);
            GameLevelDataManager gameLevelDataManager = new GameLevelDataManager(this);

            PauseScreen pauseScreen = new PauseScreen(this);
            ScreensMananger screensMananger = new ScreensMananger(this);
            BackgroundScreen backgroundScreen = new BackgroundScreen(this, 100);
            screensMananger.Push(backgroundScreen);

            MainMenuScreen mainMenu = new MainMenuScreen(this);
            mainMenu.IsModal = true;
            screensMananger.Push(mainMenu);

            WelcomeScreen welcomeScreen = new WelcomeScreen(this);
            screensMananger.SetCurrentScreen(welcomeScreen);
            backgroundScreen.State = eScreenState.Active;

            m_SoundManager = new SoundManager(this);
        }
Beispiel #2
0
        public MarsIntruders()
        {
            GraphicsDeviceManager deviceManager = new GraphicsDeviceManager(this);
            GameOptions.GetInstance().DeviceManager = deviceManager;
            Content.RootDirectory = "Content";

            new InputManager(this);
            new SoundManager(this);
            new CollisionsManager(this);

            /*r_Score = new ScoreDisplay(r_Factory);
            r_BlueShip = new BlueShip(r_Factory);
            r_BlueShip.ShipHit += MarsIntruders_ShipHit;
            r_BlueShip.ScoreChanged += MarsIntruders_ScoreChanged;
            r_GreenShip = new GreenShip(r_Factory);
            r_GreenShip.ShipHit += MarsIntruders_ShipHit;
            r_GreenShip.ScoreChanged += MarsIntruders_ScoreChanged;
            r_Lives = new LivesMatrix(r_Factory, 3);
            new Wall(r_Factory);
            r_MotherShip = new MotherShip(r_Factory);
            r_Monsters = new EnemyMatrixLogic(r_Factory);
            r_Monsters.MatrixChanged += MarsIntruders_MatrixChanged;*/

            ScreensMananger screensMananger = new ScreensMananger(this);
            screensMananger.Push(new LevelScreen(this));
            screensMananger.SetCurrentScreen(new WelcomeScreen(this));
        }
        protected override void Initialize()
        {
            m_ScreensMananger = new ScreensMananger(this);
            WelcomeScreen WelcomeScreen = new WelcomeScreen(this);

            m_ScreensMananger.SetCurrentScreen(WelcomeScreen);
            base.Initialize();
            m_SoundsManager.PlayBackRoundSong();
        }
        public SpaceInvadersGame()
        {
            this.Window.Title   = "Space Invaders";
            this.IsMouseVisible = true;
            this.Background     = new SpaceBG(this);
            this.GameState      = new GameState(this);
            ScreensMananger screensMananger = new ScreensMananger(this);

            screensMananger.Push(new PlayScreen(this));
            screensMananger.SetCurrentScreen(new WelcomeScreen(this));
        }
Beispiel #5
0
        public InvadersGame()
        {
            m_Graphics            = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            Services.AddService(m_Graphics);
            m_InputManager = new InputManager(this);
            m_GameSettings = new GameSettings(this);
            ScreensMananger screenManager = new ScreensMananger(this);

            screenManager.SetCurrentScreen(new WelcomeScreen(this));
        }
        public SpaceInvaders() : base()
        {
            m_ScreensMananger = new ScreensMananger(this);
            InputManager      inputManager      = new InputManager(this);
            CollisionsManager collisionsManager = new CollisionsManager(this);
            SettingsManager   settingsManager   = new SettingsManager(this);
            SoundsManager     soundsManager     = new SoundsManager(this);

            m_ScreensMananger.Push(new GameOverScreen(this));
            m_ScreensMananger.Push(new SpaceInvadersGameScreen(this));
            m_ScreensMananger.SetCurrentScreen(new WelcomeScreen(this));
        }
Beispiel #7
0
        public SpaceInvaders()
        {
            r_Graphics            = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            this.Window.Title     = "Space Invaders";

            r_InputManager      = new InputManager(this);
            r_CollisionsManager = new CollisionsManager(this);
            r_Settings          = new SpaceInvadersSettings(this);

            r_ScreensManager = new ScreensMananger(this, r_Graphics);
            r_ScreensManager.Push(new GameOverScreen(this));
            r_ScreensManager.SetCurrentScreen(new WelcomeScreen(this));
        }
Beispiel #8
0
        public InvadersGame()
        {
            r_GraphicsManager = new GraphicsDeviceManager(this);
            Services.AddService(typeof(GraphicsDeviceManager), r_GraphicsManager);
            r_ScreensMananger = new ScreensMananger(this);
            m_InputManager    = new InputManager(this);
            new SoundManager(this, k_BackgroundMusicAsset);
            new GameManager(this);
            new CollisionsManager(this);

            IsMouseVisible        = true;
            Content.RootDirectory = "Content";
            r_GraphicsManager.PreferredBackBufferWidth  = k_WidthSize;
            r_GraphicsManager.PreferredBackBufferHeight = k_HeightSize;

            Components.Add(new Background(this));
            r_ScreensMananger.Push(new GameOverScreen(this));
            r_ScreensMananger.SetCurrentScreen(new WelcomeScreen(this));
        }
        public SpaceInvaders()
        {
            m_GraphicsMgr = new GraphicsDeviceManager(this);
            m_GraphicsMgr.PreferredBackBufferHeight = 600;
            m_GraphicsMgr.PreferredBackBufferWidth  = 800;
            this.Content.RootDirectory = "Content";
            SpaceInvadersSettings settings = SpaceInvadersSettings.GetInstance(this);

            settings.GraphicsManager = m_GraphicsMgr;

            m_InputManager     = new InputManager(this);
            m_SoundManager     = SoundEffectsManager.GetInstance(this);
            m_TransitionScreen = new LevelTransitionScreeen(this, 1);
            m_PlayGameScreen   = new PlayGameScreen(this, m_TransitionScreen);
            m_WelcomeScreen    = new WelcomeScreen(this, m_PlayGameScreen, m_TransitionScreen);
            m_ScreensManager   = new ScreensMananger(this);

            m_ScreensManager.Push(m_PlayGameScreen);
            m_ScreensManager.Push(m_TransitionScreen);
            m_ScreensManager.SetCurrentScreen(m_WelcomeScreen);
        }
Beispiel #10
0
        public SpaceInvaders()
        {
            this.m_GraphicsMgr = new GraphicsDeviceManager(this);
            this.m_GraphicsMgr.IsFullScreen              = false;
            this.m_GraphicsMgr.PreferredBackBufferWidth  = (int)SpaceInvadersConfig.k_DefaultWindowSize.X;
            this.m_GraphicsMgr.PreferredBackBufferHeight = (int)SpaceInvadersConfig.k_DefaultWindowSize.Y;
            this.m_GraphicsMgr.ApplyChanges();
            this.Window.Title = "Space Invaders";

            this.Services.AddService(typeof(Random), new Random());

            this.m_SoundManager = new SoundManager(this);
            new ScreenSettingsManager(this, SpaceInvadersConfig.k_DefaultWindowSize);
            this.m_SoundSettingsManager = new SoundSettingsManager(this);
            new CollisionsManager(this);
            this.m_InputManager = new InputManager(this);

            ScreensMananger screensMananger = new ScreensMananger(this);

            new SpaceInvadersEngine(this);
            GameScreen welcomeScreen  = new WelcomeScreen(this);
            GameScreen gameOverScreen = new GameOverScreen(this);

            screensMananger.AddScreen(welcomeScreen);
            screensMananger.AddScreen(gameOverScreen);
            screensMananger.AddScreen(new PlayScreen(this));
            screensMananger.AddScreen(new MainMenuScreen(this));
            screensMananger.AddScreen(new PauseScreen(this));
            screensMananger.AddScreen(new ScreenSettingsScreen(this));
            screensMananger.AddScreen(new SoundSettingsScreen(this));
            screensMananger.AddScreen(new LevelTransitionScreen(this));

            screensMananger.SetCurrentScreen(welcomeScreen);

            Content.RootDirectory = "Content";
        }
 private void setScreenStack(ScreensMananger i_ScreensManager)
 {
     i_ScreensManager.Push(new DummyGameScreen(this));
     i_ScreensManager.SetCurrentScreen(new WelcomeScreen(this));
 }