Example #1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            spriteBatch.Begin();

            GraphicsDevice.Clear(Color.Black);

            carte.Draw(spriteBatch, camera);

            if (hero.position.Y < 512 && hero.position.X < 512 - hero.Width)
            {
                spriteBatch.Draw(love, new Rectangle(138, 0, 179, 153), Color.White);
            }

            if (hero.position.Y == 960 && hero.position.X < 64 - hero.Width)
            {
                spriteBatch.Draw(complete, new Rectangle(Divers.Largeur_Ecran / 2 - 125, Divers.Hauteur_Ecran / 2 - 20, 250, 40), Color.White);
            }

            hero.Draw_Hero(spriteBatch, camera);
            // TODO: Add your drawing code here
            spriteBatch.End();
            base.Draw(gameTime);
        }