SceneManager.context

The reference to the current stage, as if it is under initialization, whether it is during a restart or without them.

This link is selected depending on what is happening. If this is caused during the change of context, it will lead exactly the scene that receives the context. If the manager restarts the game, the link leads to the scene, which is now restarting if there are no such events, then the scene leads to the current working scene.

class SceneManager
@safe @property
context
()

Examples

@FunEvent!Init
void Initialization() @safe
{
    assert(sceneManager.initable is sceneManager.context); // ok
}

@FunEvent!Step
void Move() @safe
{
    assert(sceneManager.current is sceneManager.context); // ok
}

@FunEvent!GameRestart
void onGameRestart() @safe
{
    assert(sceneManager.restarted is sceneManager.context); // ok
}

Meta