Ejemplo n.º 1
0
 public void Draw(SpriteBatch spritebatch)
 {
     if (Texture != null)
     {
         // Only scales the image, need to code a way to render a partial image
         spritebatch.Draw(Texture, Position, null, Color.White, 0f, Vector2.Zero, Scale, SpriteEffects.None, 0f);
     }
     else
     {
         myBox.Draw(spritebatch);
     }
 }
Ejemplo n.º 2
0
 public void Draw(SpriteBatch spritebatch)
 {
     if (Textured == true)
     {
         spritebatch.Draw(CurrentTexture, Position, Color.White);
         spritebatch.DrawString(Font, Text, TextPosition, Color.White);
     }
     else
     {
         DefaultBox.Draw(spritebatch);
         spritebatch.DrawString(Font, Text, TextPosition, Color.White);
     }
 }