Example #1
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (direction)
     {
         Vector2 temp        = new Vector2();
         var     destination = new Rectangle((int)bounds.X, (int)bounds.Y, 192, 180);
         var     source      = new Rectangle(
             frame * 64, // X value
             0,          // Y value
             64,         // Width
             60          // Height
             );
         // render the sprite
         spriteBatch.Draw(texture, destination, source, Color.White, 0, temp, SpriteEffects.FlipHorizontally, 1);
     }
     else
     {
         var destination = new Rectangle((int)bounds.X, (int)bounds.Y, 192, 180);
         var source      = new Rectangle(
             frame * 64, // X value
             0,          // Y value
             64,         // Width
             60          // Height
             );
         // render the sprite
         spriteBatch.Draw(texture, destination, source, Color.White);
     }
     if (level == 2 && fireballloaded)
     {
         fireball.Draw(spriteBatch);
     }
     if (level == 3 && fireball2loaded)
     {
         fireball.Draw(spriteBatch);
         fireball2.Draw(spriteBatch);
     }
 }
Example #2
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(texture, bounds, Color.White);
     fireball.Draw(spriteBatch);
 }