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.ActiveItems; using Sprint3_actual.StateFiles; namespace Sprint3_actual { class WoodenSwordItem : IStageItem { private ISprite WoodenSwordSprite; private Rectangle posRectangle; public bool removed; public bool hasActiveItem => false; //needs sword projectile with type ILink instead of type Link public bool isStoreableItem => false; public WoodenSwordItem(int xPos, int yPos) { this.removed = false; this.posRectangle = new Rectangle(xPos, yPos, 7, 16); this.WoodenSwordSprite = ItemSpriteFactory.Instance.CreateWoodenSwordItem(this); } public void setPos(int destx, int desty) { posRectangle = new Rectangle(destx, desty, 7, 16); WoodenSwordSprite = ItemSpriteFactory.Instance.CreateWoodenSwordItem(this); } public Rectangle getPos() { return posRectangle; } public void DrawItem() { if (!removed) { WoodenSwordSprite.draw(); } } public void UpdateItem(GameTime gameTime) { WoodenSwordSprite.update(gameTime); } public void Collide() { removed = true; this.posRectangle.X = 200; } public bool IsRemoved() { return removed; } public IActiveItem ReturnItem(ILink link, Game1 game) { return null; //needs sword projectile with type ILink instead of type Link } } }