Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经尝试了下面给出的代码:
Assets.font.draw(objspritebatch, chooseBackground, Gdx.graphics.getWidth()*.5f,Gdx.graphics.getHeight()*.5f);
如果您要绘制文本,它可能在游戏的 HUD 或菜单中。然后你应该检查scene2d,尤其是scene2d.ui 小部件Label。并且不要忘记探索API。
但是,要在屏幕上简单地绘制文本,请查看此 wiki 文章。如果您想使用自己的自定义字体,则需要将其与Hiero打包。