在单击“主页”按钮之前。

游戏结束后,滚动错误。

我以前在show()中编写代码:
Pixmap pix = new Pixmap(Gdx.files.internal("data/bgplay_10.png"));
background_play = new Texture(pix);
background_play.setWrap(Texture.TextureWrap.Repeat,
Texture.TextureWrap.Repeat);
sprite = new Sprite(background_play, 0, 0, 800, 192);
sprite.setSize(800, 192);
sprite.setPosition(0, 288);并提交():
scrollTimer -= Gdx.graphics.getDeltaTime() / 2;
if (scrollTimer > 1)
scrollTimer = 0;
sprite.setU(scrollTimer);
sprite.setU2(scrollTimer + 1);如何调试??
发布于 2013-11-14 03:41:05
您负责管理从Pixmap创建的纹理。如果您将该FileHandle传递给纹理构造函数,则LibGDX将自动管理它。如果要使用Pixmap,则需要自己重新加载图像。
发布于 2014-03-24 20:44:10
我想出的解决方案可以在下面的链接中找到。它允许您通过像素映射生成纹理并进行管理。
https://stackoverflow.com/questions/19968224
复制相似问题