public InputSystem()
     : base(typeof(InputComponent))
 {
     Mouse = new MouseInputDevice();
     Keyboard = new KeyboardInputDevice();
     Gamepad = new GamepadInputDevice();
 }
        public static FigureController Create(Game2D game, InputDeviceType inputDeviceType, int playerIndex)
        {
            IInputDevice inputDevice;

            switch (inputDeviceType)
            {
            case InputDeviceType.Keyboard:
                var keys = GetKeysFromPlayerIndex(game, playerIndex);
                inputDevice = KeyboardInputDevice.CreateKeyboardInputDevice(game, keys[0], keys[1], keys[2], keys[3], keys[4], Keys.Escape);
                break;

            case InputDeviceType.Gamepad:
                inputDevice = new GamePadInputDevice(game, IntToPlayerIndex(playerIndex));
                break;

            default:
                throw new InvalidOperationException("Invalid Input Device Type");
            }

            return(new PlayerController(inputDevice));
        }
 public InputSystem()
 {
     Mouse = new MouseInputDevice();
     Keyboard = new KeyboardInputDevice();
 }