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()
        {
            // 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

            bg = new Background(Content.Load <Texture2D>("background"));

            ng = new MenuSprite(Content.Load <Texture2D>("newgame"), Content.Load <Texture2D>("mo_newgame"), 5, 0);
            ex = new MenuSprite(Content.Load <Texture2D>("exit"), Content.Load <Texture2D>("mo_exit"), 5, 180);
            lg = new MenuSprite(Content.Load <Texture2D>("loadgame"), Content.Load <Texture2D>("mo_loadgame"), 5, 60);
            st = new MenuSprite(Content.Load <Texture2D>("settings"), Content.Load <Texture2D>("mo_settings"), 5, 120);

            bgMusic = Content.Load <Song>("dogface");
            MediaPlayer.Play(bgMusic);
            MediaPlayer.IsRepeating = true;
        }