using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Content; using System; using System.Collections.Generic; using System.Text; namespace Sprint2_actual { class BlockSprite : ISprite { public Texture2D Texture { get; set; } public int SpriteWidth { get; set; } public int SpriteHeight { get; set; } public int SpriteX { get; set; } public int SpriteY { get; set; } public BlockSprite(Texture2D texture, int posX, int posY, int width, int height) { Texture = texture; SpriteWidth = width; SpriteHeight = height; SpriteX = posX; SpriteY = posY; //pos = new Vector2(startingPosX, startingPosY); } public void draw() { Rectangle sourceRectangle = new Rectangle(SpriteX, SpriteY, SpriteWidth, SpriteHeight); Rectangle destinationRectangle = new Rectangle(400, 200, 2*SpriteWidth, 2*SpriteHeight); GlobalVars.spriteBatch.Draw(Texture, destinationRectangle, sourceRectangle, Color.White); } public void update(GameTime gameTime) { } } }