Пример #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>

        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        public override void LoadContent(ContentManager Content)
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            bgmusic = Content.Load <Song>("bgmusic01");

            MediaPlayer.Play(bgmusic);
            #region ChangingBackgrounds LoadContent backgroudn loads
            changingbackgrounds[0] = Content.Load <Texture2D>("changingbackground/image1");
            changingbackgrounds[1] = Content.Load <Texture2D>("changingbackground/image2");
            changingbackgrounds[2] = Content.Load <Texture2D>("changingbackground/image3");
            changingbackgrounds[3] = Content.Load <Texture2D>("changingbackground/image4");
            changingbackgrounds[4] = Content.Load <Texture2D>("changingbackground/image5");

            changingbackgrounds[5] = Content.Load <Texture2D>("changingbackground/image6");
            changingbackgrounds[6] = Content.Load <Texture2D>("changingbackground/image7");
            changingbackgrounds[7] = Content.Load <Texture2D>("changingbackground/image8");
            changingbackgrounds[8] = Content.Load <Texture2D>("changingbackground/image9");
            changingbackgrounds[9] = Content.Load <Texture2D>("changingbackground/image10");
            #endregion
            // TODO: use this.Content to load your game content here
            buttonobject.LoadContent(Content);
            buttonengine.LoadContent(Content);
            whitebox   = Content.Load <Texture2D>("whitebox");
            spritefont = Content.Load <SpriteFont>("content/SpriteFont1");
            texttospeechengine.LoadContent(Content);
            texttospeechobject.LoadContent(Content);

            MediaPlayer.Volume = .05f;
        }