Game-Design / Sprint3_actual / Items / doritos.cs
doritos.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.SpriteFactories;
using Sprint3_actual.ActiveItems;
using Sprint3_actual.StateFiles;

namespace Sprint3_actual
{
    class doritos : IStageItem
    {

        private ISprite DoritoSprite;
        private Rectangle posRectangle;
        private bool removed;

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

        public doritos(int xPos, int yPos)
        {
            this.removed = false;
            this.posRectangle = new Rectangle(xPos, yPos, 96, 96);
            this.DoritoSprite = ItemSpriteFactory.Instance.CreateDoritosItem(this);

        }

        public void setPos(int destx, int desty)
        {
            posRectangle = new Rectangle(destx, desty, 96, 96);
            DoritoSprite = ItemSpriteFactory.Instance.CreateDoritosItem(this);
        }
        public Rectangle getPos()
        {
            return posRectangle;

        }

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

        }

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

        }

        public void Collide()
        {
            removed = true;
            SoundManagement.SoundEngine.Instance.playHeartOrKeyGet();
            SoundManagement.SoundEngine.Instance.playTrap();

        }

        public bool IsRemoved()
        {
            return removed;
        }

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