我正在为使用libgdx的Android开发游戏,并且想知道如何制作android UI元素(如EditText和Button)。我理解它只会工作,为Android,所以我会做这样的事情:如何使用libgdx创建Android UI元素
if (Gdx.app.getType() == Application.ApplicationType.Android) {
...
}
我发现scene2d.ui可能会有所帮助,但我不使用scene2d(演员,舞台等)和不太熟悉它。相反,我使用的屏幕的,是这样的:
public class GameScreen implements Screen {
...
}
I`ve游戏原型防御看到(带libgdx写的),这是可能的。