Game
open class Game<SceneType : Scene>(val context: Context, firstScene: SceneType? = null) : ContextListener
A ContextListener that handles commonly loading assets and preparing assets. Handles scene switching and caching.
Author
Colt Daily
See also
Parameters
context
the context instance
firstScene
the initial scene the was be used immediately by the context.
SceneType
the common base interface or class of all scenes.
Constructors
Types
Functions
Link copied to clipboard
Checks if the scene of the given type is registered.
Link copied to clipboard
Removes the cached instance of Scene of the selected type. Note that this method does not dispose of the scene and will not affect shownScene.
Link copied to clipboard
Handles resizing the current scene and disposing of the current scene. If this is overridden, ensure to call setSceneCallbacks to ensure the lifecycle events happen for a Scene.
Properties
Link copied to clipboard
Provides direct access to current Scene instance handling game events.