Game-Design / Sprint3_actual / Items / BowItem.cs
BowItem.cs
Raw
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 BowItem : IStageItem
    {

        private ISprite BowSprite;
        private Rectangle posRectangle;
        private bool removed;

        public bool hasActiveItem => false;
        public bool isStoreableItem => true;

        public BowItem(int xPos, int yPos)
        {
            this.removed = false;
            this.posRectangle = new Rectangle(xPos, yPos, 18, 36);
            this.BowSprite = ItemSpriteFactory.Instance.CreateBowItem(this);

        }

        public Rectangle getPos()
        {
            return posRectangle;
        }

        public void setPos(int destx, int desty)
        {
            posRectangle = new Rectangle(destx, desty, 18, 36);
            BowSprite = ItemSpriteFactory.Instance.CreateBowItem(this);
        }

        public void DrawItem()
        {
            BowSprite.draw();
        }

        public void UpdateItem(GameTime gameTime)
        {
            //BowSprite.update(gameTime);

        }

        public void Collide()
        {
            removed = true;

        }

        public bool IsRemoved()
        {
            return removed;
        }

        public IActiveItem ReturnItem(ILink link, Game1 game)
        {
            return new Null();
        }
    }
}