using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Content; using System; using System.Collections.Generic; using System.Text; using Sprint3_actual.SpriteFactories; namespace Sprint3_actual.Blocks { class SolidBlock : IBlock { private ISprite sprite; private Rectangle posRectangle; private bool removed; private const int blockWH = 48; public SolidBlock(int xPos, int yPos, int blockType) { this.removed = false; this.posRectangle = new Rectangle(xPos, yPos, blockWH, blockWH); this.sprite = BlockSpriteFactory.Instance.CreateBlock(blockType, this); } public Rectangle getPos() { return posRectangle; } public void DrawBlock() { sprite.draw(); } public void UpdateBlock() { } public void Collide() { removed = true; } public bool IsRemoved() { return removed; } public bool isMovable() { return false; } public bool isExit() { return false; } } }