variables:
int sourceX = 0;
create() method:
texture = new Texture(Gdx.files.internal("background.jpg"));
texture.setWrap(Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat);
render() method:
batch.begin();
sourceX+=velocitaScorrimentoSfondo;
batch.draw(texture, 0, 0, sourceX, 0, (int) texture.getWidth(), (int) texture.getHeight());
batch.end();
my goal is to run in the background automatically . from left to right . We did but on iOS , when I start the simulator with RoboVM scrolling does not work , that is, I do not see the background . while the simulator genymotion , and , on physical devices Android , the whole works . using the Actor ( Image ) everything works , only the draw will not do. Or if someone advises me how to slide the background Actor , transform the background sliding Actor. It ' may have graphics libraries ? How can I fix ? If you want other code write it in the comments .