Esempio n. 1
0
 public void setDeadZones(float xDeadZone, float yDeadZone) {
   for (int i = 0; i < Controllers.getControllerCount(); i++) {
     Controller c = Controllers.getController(i);
     c.setXAxisDeadZone(xDeadZone);
     c.setYAxisDeadZone(yDeadZone);
   }
 }
Esempio n. 2
0
 public void createControllers() {
   Controllers.destroy();
   try {
     Controllers.create();
     for (int i = 0; i < Controllers.getControllerCount(); i++) {
       Controller c = Controllers.getController(i);
       c.setXAxisDeadZone(DEFAULT_DEAD_ZONE);
       c.setYAxisDeadZone(DEFAULT_DEAD_ZONE);
     }
     buttonWasPressed =
         new boolean[getControllerCount()][Controllers.getController(0).getButtonCount()];
     // c = controller index
     for (int c = 0; c < buttonWasPressed.length; c++) {
       // b = buttonID index
       for (int b = 0; b < buttonWasPressed[0].length; b++) {
         buttonWasPressed[c][b] = false;
       }
     }
   } catch (LWJGLException e) {
     // TODO Auto-generated catch block
     // Sys.alert("Something went wrong!", e.getMessage());
   }
 }