Esempio n. 1
0
 public void Update()
 {
     prev_state = curr_state;
     if (XInput.XInputGetState(index, ref curr_state) != 0x0) //0x0 is ERROR_SUCCESS
     {
         curr_state.Gamepad.Zero();
     }
 }
Esempio n. 2
0
 public static extern int XInputGetState(int ControllerIndex, ref XInputState State);
Esempio n. 3
0
 public XboxController(int Index)
 {
     index      = Index;
     curr_state = new XInputState();
     prev_state = new XInputState();
 }