예제 #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()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here

            // background music
            startMusic      = Content.Load <Song>("Sounds/StartMusic");
            backgroundMusic = Content.Load <Song>("Sounds/BackgroundMusic");
            click           = Content.Load <SoundEffect>("Sounds/Click");

            // Instantiate all scenes
            startScene = new StartScene(this, spriteBatch, startMusic, click);
            this.Components.Add(startScene);

            playScene = new PlayScene(this, spriteBatch, backgroundMusic);
            this.Components.Add(playScene);

            helpScene = new HelpScene(this, spriteBatch);
            this.Components.Add(helpScene);

            highScoreScene = new HighScoreScene(this, spriteBatch);
            this.Components.Add(highScoreScene);

            aboutScene = new AboutScene(this, spriteBatch);
            this.Components.Add(aboutScene);

            // Show only startScene and play start music
            startScene.Show();
            SwitchMusic(startMusic);
        }