Exemplo n.º 1
0
 // Poll the state of the controller's buttons, thumbsticks, and triggers
 public static bool GetState(int controllerNumber, out XInputState state)
 {
     return XInputMethods.XInputGetState(controllerNumber, out state) == 0;
 }
Exemplo n.º 2
0
 static extern uint XInputGetState(
     int index,  // [in] Index of the gamer associated with the device
     out XInputState state // [out] Receives the current state
 );
Exemplo n.º 3
0
 public bool Equals(XInputState rhs)
 {
     return PacketNumber == rhs.PacketNumber
             && Gamepad.Equals(rhs.Gamepad);
 }
Exemplo n.º 4
0
        public bool ControllerConnected()
        {
            XInputState state = new XInputState();
            if (XInputMethods.GetState(0, out state))
            {
                return true;
            }

            return false;

        }
Exemplo n.º 5
0
 extern static uint XInputGetState(
     int index,            // [in] Index of the gamer associated with the device
     out XInputState state // [out] Receives the current state
     );
Exemplo n.º 6
0
 // Poll the state of the controller's buttons, thumbsticks, and triggers
 public static bool GetState(int controllerNumber, out XInputState state)
 {
     return(XInputMethods.XInputGetState(controllerNumber, out state) == 0);
 }
Exemplo n.º 7
0
 public bool Equals(XInputState rhs)
 {
     return(PacketNumber == rhs.PacketNumber &&
            Gamepad.Equals(rhs.Gamepad));
 }