コード例 #1
0
ファイル: Grouper.java プロジェクト: jtorrente/ead
 @Override
 public void act(float delta) {
   super.act(delta);
   if (modified) {
     modifier.getHandles().readActorTransformation();
     modified = false;
   }
 }
コード例 #2
0
ファイル: Grouper.java プロジェクト: jtorrente/ead
 @Override
 public void act(float delta) {
   super.act(delta);
   // If the grouper has been modified, transformation must be
   // transmitted to represented actors
   if (modified) {
     updateTransformation();
   }
 }
コード例 #3
0
ファイル: GameRoot.java プロジェクト: Takonan/gdx-ui-app
 @Override
 public void act(float delta) {
   totalTime += delta;
   accum += delta;
   if (accum > end) {
     accum = 0;
     if (end > .3f) end -= .01f;
     addActor(Pools.obtain(Mob.class).init(faceRegion, end * 10f));
   }
   super.act(delta);
 }
コード例 #4
0
ファイル: Stage.java プロジェクト: QuantScientist3/libgdx
  /**
   * Calls the {@link Actor#act(float)} method on each actor in the stage. Typically called each
   * frame. This method also fires enter and exit events.
   *
   * @param delta Time in seconds since the last frame.
   */
  public void act(float delta) {
    // Update over actors. Done in act() because actors may change position, which can fire
    // enter/exit without an input event.
    for (int pointer = 0, n = pointerOverActors.length; pointer < n; pointer++) {
      Actor overLast = pointerOverActors[pointer];
      // Check if pointer is gone.
      if (!pointerTouched[pointer]) {
        if (overLast != null) {
          pointerOverActors[pointer] = null;
          screenToStageCoordinates(
              tempCoords.set(pointerScreenX[pointer], pointerScreenY[pointer]));
          // Exit over last.
          InputEvent event = Pools.obtain(InputEvent.class);
          event.setType(InputEvent.Type.exit);
          event.setStage(this);
          event.setStageX(tempCoords.x);
          event.setStageY(tempCoords.y);
          event.setRelatedActor(overLast);
          event.setPointer(pointer);
          overLast.fire(event);
          Pools.free(event);
        }
        continue;
      }
      // Update over actor for the pointer.
      pointerOverActors[pointer] =
          fireEnterAndExit(overLast, pointerScreenX[pointer], pointerScreenY[pointer], pointer);
    }
    // Update over actor for the mouse on the desktop.
    ApplicationType type = Gdx.app.getType();
    if (type == ApplicationType.Desktop
        || type == ApplicationType.Applet
        || type == ApplicationType.WebGL)
      mouseOverActor = fireEnterAndExit(mouseOverActor, mouseScreenX, mouseScreenY, -1);

    // Run actions and determine whether to request rendering (for when setContinuousRendering is
    // off)
    root.act(delta);
  }
コード例 #5
0
 /**
  * *********************************************************************************** This
  * handles physics stuff
  * ***********************************************************************************
  */
 @Override
 public void act(float delta) {
   super.act(delta);
 }