KtxGame

constructor(firstScreen: ScreenType? = null, clearScreen: Boolean = true)

Parameters

firstScreen

will be immediately used by the application. Note that it cannot use any resources initiated by the libGDX (like the OpenGL context) in the constructor, as the screen will be created before the application is launched. Defaults to an empty, mock-up screen implementation that should be replaced with the first setScreen method call in create. Note: firstScreen still has to be explicitly registered with addScreen if you want it to be accessible with getScreen.

clearScreen

if true (the default), clearScreen will be called before screen rendering.

ScreenType

common base interface or class of all screens. Allows to use custom extended Screen API.