Game-Design / Sprint3 / Link State Files / LinkStateLeftUseItem.cs
LinkStateLeftUseItem.cs
Raw
namespace Sprint2_actual.StateFiles
{
    public class LinkStateLeftUseItem : ILinkState
    {
        private Link link;
        private int counter = 15;

        public LinkStateLeftUseItem(Link link)
        {
            this.link = link;
            link.linkSprite = new LinkSpriteLeftUseItem(link);
            link.Item.ActiveItemLeft();
        }
        public void Update()
        {
            counter--;
            if(counter == 0)
            {
                link.state = new LinkStateLeftIdle(link);
            }
        }

        public void MoveLeft()
        {
            //NO-OP
            //Can't move while attacking
        }

        public void TakeDamage()
        {
            link.game.Player = new DamagedLink(link);
            //TO-DO: How does game get in here? Is there any alternative to passing game?
        }

        public void MoveRight()
        {
            //NO-OP
            //Can't move while attacking
        }

        public void MoveUp()
        {
            //NO-OP
            //Can't move while attacking
        }

        public void MoveDown()
        {
            //NO-OP
            //Can't move while attacking
        }
        public void Idle()
        {
            //NO-OP
            //Can't move while attacking
        }
        public void Attack()
        {
            //NO-OP
            //Already attacking
        }
        public void UseItem()
        {
            //NO-OP
            //Can't use item while moving
        }
    }
}