Exemplo n.º 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);

            //Main Manu.
            menu.LoadContent(Content);

            //Load font
            font = Content.Load <SpriteFont>("ScoreFont/Score");

            //Scrolling path load.
            scrolling1 = new ScrollingPath(Content.Load <Texture2D>("path"), new Rectangle(0, 930, 1920, 150));
            scrolling2 = new ScrollingPath(Content.Load <Texture2D>("path2"), new Rectangle(1920, 930, 1920, 150));

            //Background load.
            backGround1 = new BackGround(Content.Load <Texture2D>("LabBGNew"), new Rectangle(0, 0, 2000, 1080));
            backGround2 = new BackGround(Content.Load <Texture2D>("LabBGNew"), new Rectangle(2000, 0, 2000, 1080));
            backGround3 = new BackGround(Content.Load <Texture2D>("GraduationBG"), new Rectangle(4000, 0, 2000, 1080));
            backGround4 = new BackGround(Content.Load <Texture2D>("WorkBG2"), new Rectangle(6000, 0, 2000, 1080));
            backGround5 = new BackGround(Content.Load <Texture2D>("WorkBG2"), new Rectangle(8000, 0, 2000, 1080));
            backGround6 = new BackGround(Content.Load <Texture2D>("StartScreen/darkscreen"), new Rectangle(-1366 + darkscreenmovement, 0, 1366, 788));

            //Set default velocity to runner.
            velocity.X = 3f;
            velocity.Y = 3f;

            //Load hurdles.
            hurdle1 = new Hurdles(Content.Load <Texture2D>("Pickups/(b)missed_alarm_pickup"), new Rectangle(2010, 790, 150, 150));
            hurdle2 = new Hurdles(Content.Load <Texture2D>("Pickups/(b)missed_alarm_pickup"), new Rectangle(3800, 650, 150, 150));
            hurdle3 = new Hurdles(Content.Load <Texture2D>("Pickups/(b)missed_alarm_pickup"), new Rectangle(1500, 400, 150, 150));
            hurdle4 = new Hurdles(Content.Load <Texture2D>("Pickups/(b)missed_alarm_pickup"), new Rectangle(575, 600, 150, 150));

            //Start Manu item Loading.
            IsMouseVisible = true;
            startButton    = Content.Load <Texture2D>("StartScreen/start");
            exitButton     = Content.Load <Texture2D>("StartScreen/exit");
            resumeButton   = Content.Load <Texture2D>("StartScreen/resume");
            loadingScreen  = Content.Load <Texture2D>("StartScreen/loading");
            pushButton     = Content.Load <Texture2D>("StartScreen/pause");
            resumeButton   = Content.Load <Texture2D>("StartScreen/resume");

            // Load audio objects
            gameMusic = Content.Load <Song>("game_music");
            MediaPlayer.IsRepeating = true;
        }