com.badlogic.gdx.scenes.scene2d.ui.Image.act()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Image.act()方法的一些代码示例,展示了Image.act()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Image.act()方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Image
类名称:Image
方法名:act

Image.act介绍

暂无

代码示例

代码示例来源:origin: SquidPony/SquidLib

/**
 * Updates the actor based on time. Typically this is called each frame by
 * {@link com.badlogic.gdx.scenes.scene2d.Stage#act(float)}.
 * <p>
 * The default implementation calls
 * {@link com.badlogic.gdx.scenes.scene2d.Action#act(float)} on each action and removes actions that are complete.
 *
 * @param delta Time in seconds since the last frame.
 */
@Override
public void act(float delta) {
  super.act(delta);
  progress = (progress + delta) % (loopTime - 0.001f);
}

代码示例来源:origin: yichen0831/Bomberman_libGdx

@Override
  public void act(float delta) {
    super.act(delta);
    stateTime += delta;
    setDrawable(new TextureRegionDrawable(anims.get(currentAnim).getKeyFrame(stateTime)));
  }
}

代码示例来源:origin: Var3D/var3dframe

public void draw(Batch batch, float parentAlpha) {
  bg0.act(Gdx.graphics.getDeltaTime());
  bg0.draw(batch, 1);
  super.draw(batch, parentAlpha);
}

代码示例来源:origin: lycying/c2d-engine

@Override
public void act(float delta) {
  super.act(delta);
  this.setScale(Engine.getDefaultCamera().zoom);
  float tx = Engine.getDefaultCamera().position.x - Engine.getDefaultCamera().viewportWidth / 2 * Engine.getDefaultCamera().zoom;
  float ty = Engine.getDefaultCamera().position.y + Engine.getDefaultCamera().viewportHeight / 2 * Engine.getDefaultCamera().zoom - this.getHeight() * this.getScaleX();
  this.setPosition(tx, ty);
}

相关文章