//retorna el estado de un boton public bool joy_button_down(XB360Digital button_id) { if (!joystickConected) { return(false); } int buttonIntValue = (int)button_id; return(currentJoystickState[buttonIntValue]); }
/// <summary> /// Informa si un boton se presiono y luego se libero /// </summary> public bool joy_button_pressed(XB360Digital button_id) { var k = (int)button_id; return(!previousJoystickState[k] && currentJoystickState[k]); }