Scene
Acts as a controller. Subclasses must override at least one of: sceneInit or sceneMain.
The lifecycle of the Scene for (SceneContainer.pushTo, SceneContainer.changeTo, SceneContainer.back, SceneContainer.forward):
OLD Scene -> NEW Scene -- Scene is changed
NEW: sceneInit - BLOCK - Called when this scene enters. Waits until completed
NEW: sceneMain - DO NOT BLOCK - Called after sceneInit. Doesn't wait for completion. Its underlying Job is closed automatically on sceneAfterDestroy
OLD: sceneBeforeLeaving - BLOCK - Called on the old scene. Waits until completed.
Transition from the old view and the new view is performed the animation transition set values for View.ratio in the SceneContainer.transitionView in the range 0..1
OLD: sceneDestroy - BLOCK - Called when this scene exits. Waits until completed.
OLD: sceneAfterDestroy - DO NOT BLOCK - Cancels the Job of the old scene. Do not wait
NEW: sceneAfterInit - DO NOT BLOCK - Similar to sceneMain but after the transition.
New scene is returned
Inheritors
Properties
The ResourcesRoot singleton. Set by the init method.
The SceneContainer that contains this Scene. Set by the init method.
Functions
This method will be called by the SceneContainer that will display this Scene. This will set the injector, views, sceneContainer and resourcesRoot.
DO NOT BLOCK. Called on the old scene after the transition has been performed, and the old scene is not visible anymore.
DO NOT BLOCK. Called after the old scene has been destroyed and the transition has been completed.
BLOCK. Called on the old scene after the new scene has been initialized, and before the transition is performed.
BLOCK. Called on the old scene after the transition has been performed, and the old scene is not visible anymore.
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.
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.