Example #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();
        }
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
     game.LoadContent(Content);
     welcomeScr.LoadContent(Content);
     loadingScr.LoadContent(Content);
     creditsScr.LoadContent(Content);
     configScr.LoadContent(Content);
     helpScr.LoadContent(Content);
     endScr.LoadContent(Content);
 }