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

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

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