我正在爲使用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寫的),這是可能的。