作者:麦尔小哈PICA | 来源:互联网 | 2023-09-01 08:35
本文整理了Java中com.badlogic.gdx.scenes.scene2d.Group.getScaleX()方法的一些代码示例,展示了Group.
本文整理了Java中com.badlogic.gdx.scenes.scene2d.Group.getScaleX()
方法的一些代码示例,展示了Group.getScaleX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Group.getScaleX()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.Group
类名称:Group
方法名:getScaleX
Group.getScaleX介绍
暂无
代码示例
代码示例来源: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 father=nativeTextField.getParent();
Group root=stage.getRoot();
float dx=root.getX()/root.getScaleX()-cutWidth;
float dy=root.getY()/root.getScaleY()-cutHeight;
fx+=dx;
代码示例来源:origin: Var3D/var3dframe
Group root=stage.getRoot();
float dx=root.getX()/root.getScaleX()-cutWidth;//此处存有疑问,待测
float dy=root.getY()/root.getScaleY()-cutHeight;
fx+=dx;
代码示例来源: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 {