Beispiel #1
0
 public void ProcessPausedUpdate()
 {
     DetectConnectedState();
     if (gamePadConnected)
     {
         GamePadState          state = GamePad.GetState(PlayerIndex.One);
         GamePadStickDirection leftStickDirection = DetectStickDirection(state.ThumbSticks.Left, GamePadStickType.Left);
         GamePadButtons        button             = DetectButton(state);
     }
 }
Beispiel #2
0
        public void ProcessUpdate()
        {
            DetectConnectedState();
            if (gamePadConnected)
            {
                GamePadState          state = GamePad.GetState(PlayerIndex.One);
                GamePadStickDirection leftStickDirection = DetectStickDirection(state.ThumbSticks.Left, GamePadStickType.Left);
                GamePadButtons        button             = DetectButton(state);

                if (button != GamePadButtons.None)
                {
                    ButtonMappings[button]();
                }
                if (leftStickDirection != lastLeftStickDirection)
                {
                    LeftStickMappings[leftStickDirection]();
                    lastLeftStickDirection = leftStickDirection;
                }
            }
        }