using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Content; using System; using System.Collections.Generic; using System.Text; namespace Sprint3_actual.BorderElements { class DoorSprite : ISprite { private Texture2D Texture; private int SpriteWidth; private int SpriteHeight; private int SpriteX; private int SpriteY; private Rectangle sourceRectangle; private IDoor door; public DoorSprite(Texture2D texture, int posX, int posY, int width, int height, IDoor door) { this.Texture = texture; this.SpriteWidth = width; this.SpriteHeight = height; this.SpriteX = posX; this.SpriteY = posY; this.door = door; this.sourceRectangle = new Rectangle(this.SpriteX, this.SpriteY, this.SpriteWidth, this.SpriteHeight); } public void draw() { GlobalVars.spriteBatch.Draw(Texture, door.getPos(), sourceRectangle, Color.White); } public void update(GameTime gameTime) { } } }