Ejemplo n.º 1
0
  /**
   * respond to controls
   *
   * @param im the input manager
   */
  public void respondControls(InputManager im) {
    if (im.getUp() == 0 && im.getDown() == 0 && im.getLeft() == 0 && im.getRight() == 0) {
      cursorMoveTimer = 0;
      cuUp = 0;
      cuDown = 0;
      cuLeft = 0;
      cuRight = 0;
    } else cursorMoveTimer++;

    cuUp = im.getUp();
    cuDown = im.getDown();
    cuLeft = im.getLeft();
    cuRight = im.getRight();

    fast = im.getB() > 0;
  }