private bool CheckDirectional(InputDetectionType detectionType, InputDirection direction, DirectionalInputTypes inputTypes, Keys arrowKey, Keys WASDKey, Buttons leftThumbstick, Buttons rightThumbstick, Buttons dPadDirection) { switch (detectionType) { case InputDetectionType.PressedOnce: return CheckDirectionalPressedOnce(direction, inputTypes, arrowKey, WASDKey, leftThumbstick, rightThumbstick, dPadDirection); case InputDetectionType.HeldDown: return CheckDirectionalHeldDown(inputTypes, arrowKey, WASDKey, leftThumbstick, rightThumbstick, dPadDirection); case InputDetectionType.Released: return CheckDirectionalReleased(inputTypes, arrowKey, WASDKey, leftThumbstick, rightThumbstick, dPadDirection); } return false; }
public bool Down(InputDetectionType detectionType, DirectionalInputTypes inputTypes) { // todo: for all directions: check if game is active! if (inputTypes.HasFlag(DirectionalInputTypes.ScrollWheel) && Mouse.GetScrollWheelDifference() < 0) { return(true); } else if (inputTypes != DirectionalInputTypes.ScrollWheel) // when it's only scroll wheel, do not check the rest. { return(CheckDirectional(detectionType, InputDirection.Down, inputTypes, Keys.Down, Keys.S, Buttons.LeftThumbstickDown, Buttons.RightThumbstickDown, Buttons.DPadDown)); } return(false); }
private bool CheckDirectional(InputDetectionType detectionType, InputDirection direction, DirectionalInputTypes inputTypes, Keys arrowKey, Keys WASDKey, Buttons leftThumbstick, Buttons rightThumbstick, Buttons dPadDirection) { switch (detectionType) { case InputDetectionType.PressedOnce: return(CheckDirectionalPressedOnce(direction, inputTypes, arrowKey, WASDKey, leftThumbstick, rightThumbstick, dPadDirection)); case InputDetectionType.HeldDown: return(CheckDirectionalHeldDown(inputTypes, arrowKey, WASDKey, leftThumbstick, rightThumbstick, dPadDirection)); case InputDetectionType.Released: return(CheckDirectionalReleased(inputTypes, arrowKey, WASDKey, leftThumbstick, rightThumbstick, dPadDirection)); } return(false); }
public bool Down(InputDetectionType detectionType, DirectionalInputTypes inputTypes) { // todo: for all directions: check if game is active! if (inputTypes.HasFlag(DirectionalInputTypes.ScrollWheel) && Mouse.GetScrollWheelDifference() < 0) { return true; } else if (inputTypes != DirectionalInputTypes.ScrollWheel) // when it's only scroll wheel, do not check the rest. { return CheckDirectional(detectionType, InputDirection.Down, inputTypes, Keys.Down, Keys.S, Buttons.LeftThumbstickDown, Buttons.RightThumbstickDown, Buttons.DPadDown); } return false; }