using Microsoft.Xna.Framework; using Sprint3_actual.SoundManagement; 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 CompassItem : IStageItem { private ISprite CompassSprite; private Rectangle posRectangle; private bool removed; public bool hasActiveItem => false; public bool isStoreableItem => false; public CompassItem(int xPos, int yPos) { this.removed = false; this.posRectangle = new Rectangle(xPos, yPos, 36, 36); this.CompassSprite = ItemSpriteFactory.Instance.CreateCompassItem(this); } public void setPos(int destx, int desty) { posRectangle = new Rectangle(destx, desty, 36, 36); CompassSprite = ItemSpriteFactory.Instance.CreateCompassItem(this); } public Rectangle getPos() { return posRectangle; } public void DrawItem() { CompassSprite.draw(); } public void UpdateItem(GameTime gameTime) { } public void Collide() { removed = true; SoundEngine.Instance.playItemPickup(); Inventory.Instance.setCompass(true); } public bool IsRemoved() { return removed; } public IActiveItem ReturnItem(ILink link, Game1 game) { return null; } } }