Beispiel #1
0
        public InputBinderTestInputHandler(EInputHandlerResult inInputHandlerResult)
            : base()
        {
            ButtonResponses.Add
            (
                InputKeyToUse, pressed =>
            {
                ReceivedResponse = true;
                return(inInputHandlerResult);
            }
            );

            AnalogResponses.Add
            (
                InputKeyToUse, analogValue =>
            {
                ReceivedResponse = true;
                return(inInputHandlerResult);
            }
            );

            MouseResponses.Add
            (
                InputKeyToUse, mousePosition =>
            {
                ReceivedResponse = true;
                return(inInputHandlerResult);
            }
            );
        }
Beispiel #2
0
        public InteractionInputHandler(IInteractionInterface inInteractionInterface)
            : base()
        {
            InteractionInterface = inInteractionInterface;

            ButtonResponses.Add(EInputKey.Interact, OnInteractButton);
        }
Beispiel #3
0
        public PauseInputHandler(ITimeServiceInterface inTimeService)
            : base()
        {
            _timeService = inTimeService;

            ButtonResponses.Add(EInputKey.TogglePause, OnTogglePause);
        }
Beispiel #4
0
        public AnimalInputHandler(ISpeciesInterface inSpeciesInterface)
            : base()
        {
            _species = inSpeciesInterface;

            ButtonResponses.Add(EInputKey.PositiveAnimalCry, OnPositiveAnimalCry);
            ButtonResponses.Add(EInputKey.NegativeAnimalCry, OnNegativeAnimalCry);
        }
Beispiel #5
0
 public CustomInputHandler(IEnumerable <EInputKey> inInputs, OnButtonInputHandledDelegate inDelegate)
     : base()
 {
     foreach (var inputKey in inInputs)
     {
         ButtonResponses.Add(inputKey, inDelegate);
     }
 }
Beispiel #6
0
        public PowerInputHandler(IPowerAssignmentInterface powerAssignmentInterface)
            : base()
        {
            _powerAssignment = powerAssignmentInterface;

            ButtonResponses.Add(EInputKey.PrimaryPower, OnPrimaryPowerInput);
            ButtonResponses.Add(EInputKey.SecondaryPower, OnSecondaryPowerInput);
        }
Beispiel #7
0
        public GadgetInputHandler(IGadgetSetInterface inGadgetSetInterface)
            : base()
        {
            _gadgetSetInterface = inGadgetSetInterface;

            ButtonResponses.Add(EInputKey.UseActiveGadget, OnUseActiveGadget);
            ButtonResponses.Add(EInputKey.CycleGadgetPositive, OnCycleGadgetPositive);
            ButtonResponses.Add(EInputKey.CycleGadgetNegative, OnCycleGadgetNegative);
        }
Beispiel #8
0
        public CompanionInputHandler(ICompanionSetInterface inCompanionSetInterface)
        {
            _companionSet = inCompanionSetInterface;

            ButtonResponses.Add(EInputKey.PrimaryPower, OnPrimaryPowerInput);
            ButtonResponses.Add(EInputKey.SecondaryPower, OnSecondaryPowerInput);

            ButtonResponses.Add(EInputKey.PrimaryDialogue, OnPrimaryDialogueInput);
            ButtonResponses.Add(EInputKey.SecondaryDialogue, OnSecondaryDialogueInput);
        }
Beispiel #9
0
        public VirtualMouseInputHandler(IVirtualMouseInterface inPointerInterface)
        {
            _pointerInterface = inPointerInterface;

            AnalogResponses.Add(EInputKey.HorizontalAnalog, OnHorizontalAnalog);
            AnalogResponses.Add(EInputKey.VerticalAnalog, OnVerticalAnalog);

            ButtonResponses.Add(EInputKey.VirtualLeftClick, OnVirtualLeftMouseClick);
            ButtonResponses.Add(EInputKey.VirtualRightClick, OnVirtualRightMouseClick);
            ButtonResponses.Add(EInputKey.VirtualMiddleClick, OnVirtualMiddleMouseClick);
        }
        public LocomotionInputHandler(IMovementInterface inMovementInterface, IPlayerCameraInterface inCameraInterface, IHeldItemInterface inHeldItemInterface)
            : base()
        {
            MovementInterface = inMovementInterface;
            CameraInterface   = inCameraInterface;
            HeldItemInterface = inHeldItemInterface;

            AnalogResponses.Add(EInputKey.HorizontalAnalog, OnHorizontalInput);
            AnalogResponses.Add(EInputKey.VerticalAnalog, OnVerticalInput);
            AnalogResponses.Add(EInputKey.CameraHorizontal, OnCameraHorizontalInput);
            AnalogResponses.Add(EInputKey.CameraZoom, OnCameraZoomInput);

            ButtonResponses.Add(EInputKey.CameraZoomReset, OnCameraZoomReset);
            ButtonResponses.Add(EInputKey.SprintButton, OnSprintButton);
            ButtonResponses.Add(EInputKey.PrimaryHeldAction, OnPrimaryHeldAction);
            ButtonResponses.Add(EInputKey.SecondaryHeldAction, OnSecondaryHeldAction);
            ButtonResponses.Add(EInputKey.DropHeldItem, OnDropHeldItem);
        }
Beispiel #11
0
        public InGameMenuInputHandler()
            : base()
        {
            ButtonResponses.Add(EInputKey.SprintButton, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.CameraZoomReset, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.Interact, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.PositiveAnimalCry, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.NegativeAnimalCry, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.PrimaryHeldAction, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.SecondaryHeldAction, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.DropHeldItem, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.PrimaryPower, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.SecondaryPower, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.UseActiveGadget, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.CycleGadgetPositive, OnDudButtonPressed);
            ButtonResponses.Add(EInputKey.CycleGadgetNegative, OnDudButtonPressed);

            AnalogResponses.Add(EInputKey.CameraHorizontal, OnDudAnalogInput);
            AnalogResponses.Add(EInputKey.CameraZoom, OnDudAnalogInput);
        }
Beispiel #12
0
 public void AddButtonResponse(EInputKey inInputKey, OnButtonInputHandledDelegate func)
 {
     ButtonResponses.Add(inInputKey, func);
 }