Beispiel #1
0
 public static bool Down(bool pressed, bool arrowKeys = true, bool scroll = true, bool wasd = true, bool thumbStick = true, bool dPad = true)
 {
     if (Core.GameInstance.IsActive)
     {
         if (MouseHandler.WindowContainsMouse && scroll)
         {
             if (MouseHandler.GetScrollWheelChange() < 0)
             {
                 return(true);
             }
         }
         if (pressed)
         {
             return(CheckDirectionalPress(PressDirections.Down, Core.KeyBindings.BackwardMove, Core.KeyBindings.Down, Buttons.LeftThumbstickDown, Buttons.DPadDown, arrowKeys, wasd, thumbStick, dPad));
         }
         if (wasd)
         {
             if (KeyBoardHandler.KeyDown(Core.KeyBindings.BackwardMove))
             {
                 return(true);
             }
         }
         if (arrowKeys)
         {
             if (KeyBoardHandler.KeyDown(Core.KeyBindings.Down))
             {
                 return(true);
             }
         }
         if (thumbStick)
         {
             if (ControllerHandler.ButtonDown(Buttons.LeftThumbstickDown))
             {
                 return(true);
             }
         }
         if (dPad)
         {
             if (ControllerHandler.ButtonDown(Buttons.DPadDown))
             {
                 return(true);
             }
         }
     }
     return(false);
 }