Пример #1
0
        /// <summary>
        /// Initialize the game, after the ScreenManager is set, but not every time
        /// the graphics are reloaded.
        /// </summary>
        public override void Initialize()
        {
            base.Initialize();

            // start up the music
            World.AudioManager.PlayMusic("gameMusic");

            // start up the game
            World.StartNewGame();
            gameOver = false;
        }
Пример #2
0
        /// <summary>
        /// Initialize the game, after the ScreenManager is set, but not every time
        /// the graphics are reloaded.
        /// </summary>
        public void Initialize()
        {
            // create and add the bloom effect
            bloomComponent = new BloomComponent(ScreenManager.Game);
            ScreenManager.Game.Components.Add(bloomComponent);
            // do not automatically draw the bloom component
            bloomComponent.Visible = false;

            // create the world
            world = new World(new Vector2(ScreenManager.GraphicsDevice.Viewport.Width,
                                          ScreenManager.GraphicsDevice.Viewport.Height));

            // retrieve the audio manager
            audio = (AudioManager)ScreenManager.Game.Services.GetService(
                typeof(AudioManager));
            world.AudioManager = audio;
            // start up the music
            audio.PlayMusic("gameMusic");
            // start up the game
            world.StartNewGame();
            gameOver = false;
        }
        /// <summary>
        /// Initialize the game, after the ScreenManager is set, but not every time
        /// the graphics are reloaded.
        /// </summary>
        public void Initialize()
        {
            // create and add the bloom effect
            bloomComponent = new BloomComponent(ScreenManager.Game);
            ScreenManager.Game.Components.Add(bloomComponent);
            // do not automatically draw the bloom component
            bloomComponent.Visible = false;

            // create the world
            world = new World(new Vector2(ScreenManager.GraphicsDevice.Viewport.Width,
                ScreenManager.GraphicsDevice.Viewport.Height));

            // retrieve the audio manager
            audio = (AudioManager)ScreenManager.Game.Services.GetService(
                typeof(AudioManager));
            world.AudioManager = audio;

            // start up the music
            audio.PlayMusic("gameMusic");

            // start up the game
            world.StartNewGame();
            gameOver = false;
        }