com.badlogic.gdx.scenes.scene2d.Group.getScaleY()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(89)

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

Group.getScaleY介绍

暂无

代码示例

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

protected Matrix4 computeTransform() {
    Affine2 worldTransform = this.worldTransform;
    Group root = getRoot();
    worldTransform.setToTrnRotScl(root.getX(), root.getY(), 0, root.getScaleX(), root.getScaleY());
    computedTransform.set(worldTransform);
    return computedTransform;
  }
}

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

public VDialog(VGame game, boolean isStretching) {
  this.isStretching = isStretching;
  this.game = game;
  stageTop = game.getTopStage();
  //在有内置虚拟按钮的安卓上会出现屏幕分辨率被改变的状况造成遮盖层无法完全覆盖底层,故强制放大1.5倍解决这个问题
  bg0 = game.getImage(stageTop.getFullWidth()*1.5f, stageTop.getFullHeight()*1.5f, Color.BLACK)
      .setPosition(game.getCenterX(), game.getCenterY(), Align.center).getActor();
  if (isStretching) {
    setScale(1f / stageTop.getRoot().getScaleX(), 1f / stageTop.getRoot().getScaleY());
  }
  addBackgroundAcition();
}

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

public void resize(float width, float height) {
  changing(width, height);
  getViewport().update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), true);
  if (isStretching) {//拉伸适配的时候,计算一下iphoneX的安全边距
    calculationCuts();
    calculationAafeArea(1, 1);
    return;
  }
  float bl = getWidth() / getHeight() * Gdx.graphics.getHeight() / Gdx.graphics.getWidth();
  if (bl < 1) {
    cutWidth = (1 - bl) * getWidth() / 2f;
    cutHeight = 0;
    getRoot().setScale(bl, 1);
    getRoot().setPosition(cutWidth, 0);
    cutWidth = cutWidth / getRoot().getScaleX();
    calculationAafeArea(bl, 1);
  } else if (bl >= 1) {
    cutWidth = 0;
    cutHeight = (1 - 1 / bl) * getHeight() / 2f;
    getRoot().setScale(1, 1 / bl);
    getRoot().setPosition(0, cutHeight);
    cutHeight = cutHeight / getRoot().getScaleY();
    calculationAafeArea(1, bl);
  }
  calculationCuts();
}

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

Group root=stage.getRoot();
float dx=root.getX()/root.getScaleX()-cutWidth;
float dy=root.getY()/root.getScaleY()-cutHeight;
fx+=dx;
fy+=dy;

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

Group root=stage.getRoot();
float dx=root.getX()-cutWidth;
float dy=root.getY()/root.getScaleY()-cutHeight;

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

float dy=root.getY()/root.getScaleY()-cutHeight;
fx+=dx;
fy+=dy;

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

Group root=stage.getRoot();
float dx=root.getX()-cutWidth;
float dy=root.getY()/root.getScaleY()-cutHeight;

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

if (isStretching) {
  addAction(Actions.sequence(Actions.scaleTo(0, 0), Actions.scaleTo(
      1f / stageTop.getRoot().getScaleX(), 1f / stageTop.getRoot().getScaleY()
      , 0.2f, Interpolation.bounce)));
} else {

相关文章

微信公众号

最新文章

更多