Exemple #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);
            enemies     = new List <Enemies>();
            Random random = new Random();

            player = new Player(Content.Load <Texture2D>("sprites/player/tempplayer"), 380, 400);

            Texture2D tempSprite = Content.Load <Texture2D>("sprites/enemies/tempenemy");

            for (int i = 0; i < 5; i++)
            {
                int rndX              = random.Next(100, Window.ClientBounds.Width - tempSprite.Width - 100);
                int tempY             = 100;
                NormalZombieBear temp = new NormalZombieBear(tempSprite, rndX, tempY, 1f, 0, 0);
                enemies.Add(temp);
            }
            bas = new Base(Content.Load <Texture2D>("sprites/player/Stacket"), 0, 280);

            //font = Content.Load<SpriteFont>("sprites/Fonts/firstfont");

            GameElements.LoadContent(Content, Window);
        }
Exemple #2
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     GameElements.LoadContent(Content, Window);
 }