解决方法
ApplicationAdapter允许您创建一个监听器,但不能被强制实现每个方法.如果您熟悉Swing,请查看KeyAdapter,这是一样的想法.
ApplicationListener允许您处理应用程序事件.这允许您在应用程序生命周期内的某些事件(如销毁)中执行代码.
An ApplicationListener is called when the Application is created,resumed,rendering,paused or destroyed. All methods are called in a thread that has the OpenGL context current. You can thus safely create and manipulate graphics resources.
游戏是一个支持多个屏幕的应用程序监听器.您可以创建多个屏幕,并使用setScreen在em之间切换.
An ApplicationListener that delegates to a Screen. This allows an application to easily have multiple screens.
屏幕正是它的声音;这是在给定的时间将显示什么.也许这是一个主菜单,也许这是实际的游戏.
Represents one of many application screens,such as a main menu,a settings menu,the game screen and so on.
建议您使用Game类作为游戏的基础,然后创建您将拥有的不同可能游戏状态的多个Screen实例.