public override void LoadContent()
        {
            spriteBatch = ScreenManager.SpriteBatch;
            backgrounds = new Background[3];
            backgrounds[0] = new Background(content, "Backgrounds/Background4", 0.2f);
            backgrounds[1] = new Background(content, "Backgrounds/Background1", 0.5f);
            backgrounds[2] = new Background(content, "Backgrounds/Background2", 0.8f);
            //player
            player = new Player(new Vector2(180.0f, 500.0f), ScreenManager, content);

            //timeline
            timeLineTexture = content.Load<Texture2D>("floor");
            timeLineBorder = content.Load<Texture2D>("ProgressBar");

            //health
            arrayHealth[0] = content.Load<Texture2D>("Battery/bat1");
            arrayHealth[1] = content.Load<Texture2D>("Battery/bat2");
            arrayHealth[2] = content.Load<Texture2D>("Battery/bat3");
            arrayHealth[3] = content.Load<Texture2D>("Battery/bat4");
            arrayHealth[4] = content.Load<Texture2D>("Battery/bat5");
        }
Exemplo n.º 2
0
        public override void LoadContent()
        {
            this.input = ScreenManager.InputSystem;
            this.spriteBatch = ScreenManager.SpriteBatch;

            backgrounds = new Background[3];
            backgrounds[0] = new Background(content, "Backgrounds/Background0", 0.2f);
            backgrounds[1] = new Background(content, "Backgrounds/Background1", 0.5f);
            backgrounds[2] = new Background(content, "Backgrounds/Background2", 0.8f);

            //player
            player = new Player(new Vector2(180.0f, 500.0f), ScreenManager, content);

            //timeline
            timeLineTexture = content.Load<Texture2D>("GameAssets/floor");
            timeLineBorder = content.Load<Texture2D>("GameAssets/ProgressBar");

            //health
            arrayHealth[0] = content.Load<Texture2D>("Battery/bat1");
            arrayHealth[1] = content.Load<Texture2D>("Battery/bat2");
            arrayHealth[2] = content.Load<Texture2D>("Battery/bat3");
            arrayHealth[3] = content.Load<Texture2D>("Battery/bat4");
            arrayHealth[4] = content.Load<Texture2D>("Battery/bat5");

            //flag
            flag = new Flag(content, new Vector2(endPositionX, 240));

            //enemyhit
            jejehit = content.Load<Texture2D>("Sprites/jejehit");
        }
        public override void LoadContent()
        {
            Song song = content.Load<Song>("sounds/Stage3");  // Put the name of your song in instead of "song_title"
            MediaPlayer.Play(song);

            spriteBatch = ScreenManager.SpriteBatch;
            backgrounds = new Background[3];
            backgrounds[0] = new Background(content, "Backgrounds/Background4", 0.2f);
            backgrounds[1] = new Background(content, "Backgrounds/Background1", 0.5f);
            backgrounds[2] = new Background(content, "Backgrounds/Background2", 0.8f);
            //player
            player = new Player(new Vector2(180.0f, 500.0f), ScreenManager, content);

            //timeline
            timeLineTexture = content.Load<Texture2D>("floor");
            timeLineBorder = content.Load<Texture2D>("ProgressBar");

            //health
            arrayHealth[0] = content.Load<Texture2D>("Battery/bat1");
            arrayHealth[1] = content.Load<Texture2D>("Battery/bat2");
            arrayHealth[2] = content.Load<Texture2D>("Battery/bat3");
            arrayHealth[3] = content.Load<Texture2D>("Battery/bat4");
            arrayHealth[4] = content.Load<Texture2D>("Battery/bat5");
        }