Game-Design / Sprint3_actual / Commands / InventoryMoveUpCommand.cs
InventoryMoveUpCommand.cs
Raw
using Microsoft.Xna.Framework.Input;
using System;
using System.Collections.Generic;
using System.Text;

namespace Sprint3_actual.Commands
{
    class InventoryMoveUpCommand : ICommand
    {
        private Game1 game1;

        public InventoryMoveUpCommand(Game1 game)
        {
            this.game1 = game;
        }
        public void Execute()
        {
            KeyboardState key = Keyboard.GetState();
            if (Inventory.Instance.key != key)
            {
                Inventory.Instance.setSlot(-1, 0);
                Inventory.Instance.key = key;
            }
        }
    }
}