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;
  }
Ejemplo n.º 2
0
 /**
  * Responds to controls. most Scene subclasses must override this, and check if they are active.
  *
  * @param im the input
  */
 public void respondControls(InputManager im) {
   // always check this
   if (active) {
     fastForwardFlag = (im.getA() > 0 || im.getB() > 0);
   }
 }