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

        private ISprite ClockSprite;
        private Rectangle posRectangle;
        private bool removed;

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

        public ClockItem(int xPos, int yPos)
        {
            this.removed = false;
            this.posRectangle = new Rectangle(xPos, yPos, 22, 32);
            this.ClockSprite = ItemSpriteFactory.Instance.CreateClockItem(this);

        }

        public void setPos(int destx, int desty)
        {
            posRectangle = new Rectangle(destx, desty, 22, 32);
            ClockSprite = ItemSpriteFactory.Instance.CreateClockItem(this);
        }

        public Rectangle getPos()
        {
            return posRectangle;

        }

        public void DrawItem()
        {
            ClockSprite.draw();

        }

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

        }

        public void Collide()
        {
            removed = true;

        }

        public bool IsRemoved()
        {
            return removed;
        }

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