Ejemplo 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()
        {
            manu  = Content.Load <Texture2D>("TDK");
            UII01 = Content.Load <Texture2D>("UI01");
            // Create a new SpriteBatch, which can be used to draw textures.
            font        = Content.Load <SpriteFont>("font");
            spriteBatch = new SpriteBatch(GraphicsDevice);
            player.Load(Content, "player", 12, 3, 20);
            //bg = Content.Load<Texture2D>("bg4");
            ball = Content.Load <Texture2D>("ball");

            this.song = Content.Load <Song>("sound");
            //lazer0.Load(Content);
            item.Load(Content);
            hp.Load(Content);

            playerX.Load(Content, "player");
            coins.Load(Content, "coin");
            MediaPlayer.Play(song);
            MediaPlayer.Volume             = 0.1f;
            MediaPlayer.MediaStateChanged += MediaPlayer_MediaStateChanged;
            // TODO: use this.Content to load your game content here
        }
Ejemplo n.º 2
0
        public void Load(ContentManager content, string asset)
        {
            playerX.Load(content, asset, 12, 3, 10);

            font = content.Load <SpriteFont>("font");
            lazer.Load(content);
            bg.Load(content);

            for (int i = 0; i < 5; i++)
            {
                coinss.Add(new coin(game, new Vector2(700 + (50 * i), 250)));
            }

            for (int i = 0; i < 5; i++)
            {
                coinss.Add(new coin(game, new Vector2(1200 + (50 * i), 250)));
            }

            for (int i = 0; i < 5; i++)
            {
                coinss.Add(new coin(game, new Vector2(2100 + (50 * i), 150)));
            }

            for (int i = 0; i < 3; i++)
            {
                coinss.Add(new coin(game, new Vector2(2500 + (50 * i), 250)));
            }

            for (int i = 0; i < 3; i++)
            {
                coinss.Add(new coin(game, new Vector2(2900 + (50 * i), 350)));
            }

            for (int i = 0; i < 7; i++)
            {
                coinss.Add(new coin(game, new Vector2(3500 + (50 * i), 150)));
            }

            for (int i = 0; i < 4; i++)
            {
                coinss.Add(new coin(game, new Vector2(4000 + (50 * i), 150)));
            }

            //coinss.Load(content,"coin");


            for (int i = 0; i < coinss.Count; i++)
            {
                coinss[i].Load(content, "coin");
            }


            hp.Load(content);


            for (int i = 0; i < 20; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(100 + (25 * (i + 1)), 400)));
            }

            for (int i = 0; i < 20; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(600 + (25 * (i + 1)), 300)));
            }

            for (int i = 0; i < 10; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(1500 + (25 * (i + 1)), 400)));
            }

            for (int i = 0; i < 10; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(2100 + (25 * (i + 1)), 400)));
            }

            for (int i = 0; i < 10; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(2500 + (25 * (i + 1)), 350)));
            }

            for (int i = 0; i < 10; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(2900 + (25 * (i + 1)), 300)));
            }

            for (int i = 0; i < 10; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(3500 + (25 * (i + 1)), 250)));
            }

            for (int i = 0; i < 10; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(4000 + (25 * (i + 1)), 400)));
            }
            for (int i = 0; i < 15; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(4500 + (25 * (i + 1)), 450)));
            }
            for (int i = 0; i < 10; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(5000 + (25 * (i + 1)), 300)));
            }

            for (int i = 0; i < 15; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(5500 + (25 * (i + 1)), 250)));
            }
            for (int i = 0; i < 10; i++)
            {
                platfroms.Add(new Platform(game, content.Load <Texture2D>("platfrom"), new Vector2(6000 + (25 * (i + 1)), 300)));
            }
        }
Ejemplo n.º 3
0
 public void Load(ContentManager content, string asset)
 {
     cointex = new projectgame.AnimatedTexture(Vector2.Zero, Rotation, Scale, Depth);
     cointex.Load(content, asset, 10, 1, 10);
 }