Game-Design / Sprint3 / Commands / PreviousItemCommand.cs
PreviousItemCommand.cs
Raw
using System;
using System.Collections.Generic;
using System.Text;

namespace Sprint2_actual.Commands
{
    public class PreviousItemCommand : ICommand
    {
        private Game1 game1;

        public PreviousItemCommand(Game1 game) //Could change this to pass only the item class when created
        {
            this.game1 = game;
        }

        public void Execute()
        {
            //Go to the previous Item that is created from factory for Item
            game1.itemMachine.ChangeSprite(-1);
        }
    }
}