CompletableScene

abstract class CompletableScene<T> : Scene

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val ag: AG

A reference to the AG from the Views

Link copied to clipboard
Link copied to clipboard
val completed: Deferred<T>
Link copied to clipboard
Link copied to clipboard
open override var extra: ExtraType
Link copied to clipboard
Link copied to clipboard
lateinit var injector: Injector

A child Injector for this instance. Set by the init method.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val resources: Resources
Link copied to clipboard

The ResourcesRoot singleton. Set by the init method.

Link copied to clipboard
Link copied to clipboard

The SceneContainer that contains this Scene. Set by the init method.

Link copied to clipboard
open val sceneHeight: Int
Link copied to clipboard
Link copied to clipboard
open val sceneWidth: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open lateinit override var views: Views

The Views singleton of the application. Set by the init method.

Functions

Link copied to clipboard
suspend fun Scene.delay(time: TimeSpan)
Link copied to clipboard
override fun init(injector: Injector)

This method will be called by the SceneContainer that will display this Scene. This will set the injector, views, sceneContainer and resourcesRoot.

Link copied to clipboard
open fun onSizeChanged(size: Size)
Link copied to clipboard
abstract suspend fun process(): T
Link copied to clipboard
open suspend fun sceneAfterDestroy()

DO NOT BLOCK. Called on the old scene after the transition has been performed, and the old scene is not visible anymore.

Link copied to clipboard
open suspend fun sceneAfterInit()

DO NOT BLOCK. Called after the old scene has been destroyed and the transition has been completed.

Link copied to clipboard
open suspend fun sceneBeforeLeaving()

BLOCK. Called on the old scene after the new scene has been initialized, and before the transition is performed.

Link copied to clipboard
open suspend fun sceneDestroy()

BLOCK. Called on the old scene after the transition has been performed, and the old scene is not visible anymore.

Link copied to clipboard
suspend override fun SContainer.sceneInit()

BLOCK. This is called to setup the scene. Nothing will be shown until this method completes. Here you can read and wait for resources. No need to call super.

Link copied to clipboard
open suspend fun SContainer.sceneMain()

DO NOT BLOCK. This is called as a main method of the scene. This is called after sceneInit. This method doesn't need to complete as long as it suspends. Its underlying job will be automatically closed on the sceneAfterDestroy. No need to call super.

Link copied to clipboard
abstract suspend fun Container.setup()