Ejemplo n.º 1
0
 /* questo è chiamato quando il gioco dovrebbe disegnare da solo
  * gameTime fornisce uno snapshot dei valori di temporizzazione */
 protected override void Draw(GameTime gameTime)
 {
     GraphicsDevice.Clear(Color.CornflowerBlue);
     // inizieremo tutto il nostro disegno qui
     spriteBatch.Begin();
     // ora possiamo fare qualsiasi rendering di entità
     character.Draw(spriteBatch);
     // fine, esegue il rendering di tutti gli sprites sullo schermo
     spriteBatch.End();
     base.Draw(gameTime);
 }
Ejemplo n.º 2
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)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            // We'll start all of our drawing here:
            spriteBatch.Begin();

            // Now we can do any entity rendering:
            character.Draw(spriteBatch);
            // End renders all sprites to the screen:
            spriteBatch.End();

            base.Draw(gameTime);
        }