【发布时间】:2015-11-17 09:52:43
【问题描述】:
变量:
int sourceX = 0;
create() 方法:
texture = new Texture(Gdx.files.internal("background.jpg"));
texture.setWrap(Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat);
render() 方法:
batch.begin();
sourceX+=velocitaScorrimentoSfondo;
batch.draw(texture, 0, 0, sourceX, 0, (int) texture.getWidth(), (int) texture.getHeight());
batch.end();
我的目标是自动在后台运行。从左到右 。 我们做了,但是在 iOS 上,当我用 RoboVM 启动模拟器时滚动不起作用,也就是说,我看不到背景。而模拟器 genymotion ,以及在物理设备上的 Android ,整个作品。 使用 Actor ( Image ) 一切正常,只有 draw 不行。 或者如果有人建议我如何滑动背景 Actor ,请转换背景滑动 Actor。 它'可能有图形库? 我该如何解决?如果你想要其他代码写在 cmets 中。
【问题讨论】:
标签: java ios libgdx draw spritebatch