v2.3.1: added support for controller vibration

This commit is contained in:
Evan Debenham
2024-01-24 14:57:40 -05:00
parent 63ea27a80a
commit bd06d891f6
3 changed files with 19 additions and 5 deletions
@@ -84,6 +84,12 @@ public class ControllerHandler implements ControllerListener {
}
}
public static void vibrate( int millis ){
if (Controllers.getCurrent().canVibrate()) {
Controllers.getCurrent().startVibration(millis, 1f);
}
}
public static boolean isControllerConnected(){
return controllersSupported() && Controllers.getCurrent() != null;
}