Beispiel #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            titleScreen.LoadContent(GraphicsDevice, Content);
            levelScreen.LoadContent(GraphicsDevice, Content);
            endScreen.LoadContent(GraphicsDevice, Content);

            //  http://www.newgrounds.com/audio/listen/564520
            //backgroundMusic = Content.Load<SoundEffect>("ambience.wav");
            //backgroundMusic.Play();

            // http://www.newgrounds.com/audio/listen/568885
            victorySound = Content.Load <SoundEffect>("victory.wav");

            // http://www.newgrounds.com/audio/listen/135985
            failureSound = Content.Load <SoundEffect>("police.wav");//failure.wav");

            gameSound = Content.Load <SoundEffect>("ambience.wav");


            mainMusic = gameSound.CreateInstance();

            victoryMusic = victorySound.CreateInstance();
            failureMusic = failureSound.CreateInstance();

            mainMusic.IsLooped = true;


            base.LoadContent();
        }
Beispiel #2
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     font        = Content.Load <SpriteFont>("font");
     MenuScreen.LoadContent();
     LevelSelectScreen.LoadContent();
     CreditsScreen.LoadContent();
     LevelScreen.LoadContent();
     LevelEndScreen.LoadContent();
     ChangeScreen(MenuScreen);
 }