我在集中我的精灵动画时遇到问题,有人可以给我一个灯吗?
public void render() {
Gdx.gl.glClearColor(1, 1, 1, 1);
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
stateTime += Gdx.graphics.getDeltaTime();
currentFrame = walkAnimation.getKeyFrame(stateTime, true);
batch.setProjectionMatrix(cam.combined);
batch.begin();
batch.draw(currentFrame, Gdx.graphics.getWidth() / 2 - ((walkSheet.getWidth()/FRAME_COLS) / 2), Gdx.graphics.getHeight() / 2 - ((walkSheet.getHeight()/FRAME_ROWS) / 2), width / 2, height / 4);
我的动画正在向左绘制几个像素。