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); } ); }
public CustomInputHandler(IEnumerable <EInputKey> inInputs, OnAnalogInputHandledDelegate inDelegate) : base() { foreach (var inputKey in inInputs) { AnalogResponses.Add(inputKey, inDelegate); } }
public PushObjectInputHandler(GameObject inPusher, IPushableObjectInterface inPushable) : base() { _pusher = inPusher; _pushable = inPushable; AnalogResponses.Add(EInputKey.VerticalAnalog, OnVerticalInput); AnalogResponses.Add(EInputKey.HorizontalAnalog, OnHorizontalInput); }
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); }
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); }
public void AddAnalogResponse(EInputKey inInputKey, OnAnalogInputHandledDelegate func) { AnalogResponses.Add(inInputKey, func); }