本文整理了Java中com.badlogic.gdx.Input.getDeltaY()
方法的一些代码示例,展示了Input.getDeltaY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Input.getDeltaY()
方法的具体详情如下:
包路径:com.badlogic.gdx.Input
类名称:Input
方法名:getDeltaY
暂无
代码示例来源:origin: libgdx/libgdx
@Override
public int getDeltaY (int pointer) {
return input.getDeltaY(pointer);
}
代码示例来源:origin: libgdx/libgdx
@Override
public int getDeltaY () {
return input.getDeltaY();
}
代码示例来源:origin: libgdx/libgdx
@Override
public boolean touchDragged (int screenX, int screenY, int pointer) {
float deltaX = -Gdx.input.getDeltaX() * degreesPerPixel;
float deltaY = -Gdx.input.getDeltaY() * degreesPerPixel;
camera.direction.rotate(camera.up, deltaX);
tmp.set(camera.direction).crs(camera.up).nor();
camera.direction.rotate(tmp, deltaY);
// camera.up.rotate(tmp, deltaY);
return true;
}
代码示例来源:origin: libgdx/libgdx
@Override
public boolean touchDragged (int screenX, int screenY, int pointer) {
float deltaX = -Gdx.input.getDeltaX() * degreesPerPixel;
float deltaY = -Gdx.input.getDeltaY() * degreesPerPixel;
camera.direction.rotate(camera.up, deltaX);
tmp.set(camera.direction).crs(camera.up).nor();
camera.direction.rotate(tmp, deltaY);
// camera.up.rotate(tmp, deltaY);
return true;
}
代码示例来源:origin: libgdx/libgdx
@Override
public void render () {
if (Gdx.input.justTouched()) {
Gdx.app.log("Input Test", "just touched, button: " + (Gdx.input.isButtonPressed(Buttons.LEFT) ? "left " : "")
+ (Gdx.input.isButtonPressed(Buttons.MIDDLE) ? "middle " : "")
+ (Gdx.input.isButtonPressed(Buttons.RIGHT) ? "right" : "")
+ (Gdx.input.isButtonPressed(Buttons.BACK) ? "back" : "")
+ (Gdx.input.isButtonPressed(Buttons.FORWARD) ? "forward" : ""));
}
for (int i = 0; i < 10; i++) {
if (Gdx.input.getDeltaX(i) != 0 || Gdx.input.getDeltaY(i) != 0) {
Gdx.app.log("Input Test", "delta[" + i + "]: " + Gdx.input.getDeltaX(i) + ", " + Gdx.input.getDeltaY(i));
}
}
// Gdx.input.setCursorPosition(Gdx.graphics.getWidth() / 2, Gdx.graphics.getHeight() / 2);
// if(Gdx.input.isTouched()) {
// Gdx.app.log("Input Test", "is touched");
// }
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
@Override
public boolean touchDragged (int screenX, int screenY, int pointer) {
float deltaX = -Gdx.input.getDeltaX() * degreesPerPixel;
float deltaY = -Gdx.input.getDeltaY() * degreesPerPixel;
camera.direction.rotate(camera.up, deltaX);
tmp.set(camera.direction).crs(camera.up).nor();
camera.direction.rotate(tmp, deltaY);
// camera.up.rotate(tmp, deltaY);
return true;
}
内容来源于网络,如有侵权,请联系作者删除!