Example #1
0
        /*************************************
         * Start new game
         *************************************/
        private void startNewGame()
        {
            titleInstance.Stop();

            game = new Model.Game(camera, spriteBatch);
            gameView = new View.GameView(spriteBatch, camera, game.getLevel(), game.getPlayer(), graphics.GraphicsDevice);

            game.LoadContent(Content);
            gameView.LoadContent(Content);

            backgroundMusic = Content.Load<SoundEffect>("level1");
            playingInstance = backgroundMusic.CreateInstance();
            playingInstance.IsLooped = true;
            playingInstance.Pan = .5f;
            playingInstance.Play();

            currentGameState = GameState.GameStarted;
        }