我试着设置单行静态文本,使其以45度的角度横跨分泌物。这是我的代码,但它没有任何效果。
mLoser = new Text(20, 430, mFont36,"Game Over! No more moves.", getVertexBufferObjectManager());
mLoser.setPosition(400 - mLoser.getWidth()/2, 480 - mLoser.getHeight()-2);
mLoser.setRotationCenter(mLoser.getX(), mLoser.getY());
mLoser.setRotation((float) -0.125);
mLoser.setVisible(false);
mMainScene.attachChild(mLoser);我让我的游戏正常工作,只是尝试了一些我以前没有用过的想法。你能解释一下这是怎么做到的吗?
发布于 2013-11-12 06:39:57
解决了,我只需要将旋转设置为-45,而不是-0.125。多!稍微调整一下定位,就得到了我想要的。
https://stackoverflow.com/questions/19903948
复制相似问题