like2d
    Preparing search index...

    Type Alias SceneInstance

    SceneInstance: LikeHandlers & { load?: () => void; quit?: () => void }

    A scene instance is just an object with event handlers. It's the like object but without the modules -- just the event handling callbacks.

    See Scene for usage.

    Type Declaration

    • Optionalload?: () => void

      Called when a scene is started or resumed (pop after a push w/o unload). Prefer to initialize in the scene constructor.

      Use case: This secene does a push without unload because we want to preserve its state, but we unload a few large assets before doing the push. When upper scene is popped, load fires so we can get those assets back.

      (Same signature as the one in LikeHandlers, just redeclared for docs)

    • Optionalquit?: () => void

      Called when a scene is pushed with unload, or popped off.

      Use case: We want to clear out any native event handlers or global resource allocations (LÏKE has neither, but maybe you do?) in case another scene kicks this one off the stack.

      (Same signature as the one in LikeHandlers, just redeclared for docs)