MrGravity.ControllerControl.IsLeftPressed C# (CSharp) Method

IsLeftPressed() public method

Checks to see if the control for left has been interacted with Only work when the button has just been pushed
public IsLeftPressed ( bool held ) : bool
held bool Set true if this button is allowed to be held down and still respond to interaction
return bool
        public bool IsLeftPressed(bool held)
        {
            var isLeftPressed = GamePad.GetState(ControllerIndex).DPad.Left == ButtonState.Pressed;
            var isUpPressed = _pressedButtons.Contains(Buttons.DPadUp);
            var isDownPressed = _pressedButtons.Contains(Buttons.DPadDown);

            if (!isLeftPressed && _pressedButtons.Contains(Buttons.DPadLeft)) _pressedButtons.Remove(Buttons.DPadLeft);
            else if (!isUpPressed && !isDownPressed && isLeftPressed) return ((IsPressed(Buttons.DPadLeft, held, ControllerIndex)));
            else if (!isUpPressed && !isDownPressed) return (LeftThumbStickIsLeft(held));
            return false;
        }