Exemple #1
0
 private void mouseXEvent(Vector2i deltaMouse, float delta) {
   MouseAxisEvent event =
       new MouseXAxisEvent(deltaMouse.x * config.getInput().getMouseSensitivity(), delta);
   setupTarget(event);
   for (EntityRef entity : getInputEntities()) {
     entity.send(event);
     if (event.isConsumed()) {
       break;
     }
   }
 }
Exemple #2
0
 private void mouseYEvent(Vector2i deltaMouse, float delta) {
   int yMovement = config.getInput().isMouseYAxisInverted() ? deltaMouse.y * -1 : deltaMouse.y;
   MouseAxisEvent event =
       new MouseYAxisEvent(yMovement * config.getInput().getMouseSensitivity(), delta);
   setupTarget(event);
   for (EntityRef entity : getInputEntities()) {
     entity.send(event);
     if (event.isConsumed()) {
       break;
     }
   }
 }