【发布时间】:2014-11-09 01:37:05
【问题描述】:
这是 create() 方法:
batch = new SpriteBatch();
texture = new Texture(Gdx.files.internal("spaceships/tfighter0.png"));
sprite = new Sprite(texture);
sprite.setOrigin(sprite.getWidth()/2, sprite.getHeight()/2);
sprite.rotate(180f);
还有render()方法:
Gdx.gl.glClearColor(0, 0, 0, 0);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
batch.draw(sprite ,200,200);
batch.end();
现在不应该旋转精灵吗?无论我在旋转方法中放入什么角度,它看起来都与 png 相同。
【问题讨论】: