Hold the stack of scenes (gdjs.RuntimeScene) being played.

Constructors

Methods

  • Parameters

    • Optional options: UpdateFromNetworkSyncDataOptions

    Returns boolean

  • Parameters

    • syncOptions: GetNetworkSyncDataOptions

    Returns null | SceneStackNetworkSyncData

  • Called by the RuntimeGame when the game resolution is changed. Useful to notify scene and layers that resolution is changed, as they might be caching it.

    Returns void

  • Pause the scene currently being played and start the new scene that is specified in options.sceneName. If options.externalLayoutName is set, also instantiate the objects from this external layout.

    Parameters

    • options: string | PushSceneOptions

      Contains the scene name and optional external layout name to instantiate.

    • Optional deprecatedExternalLayoutName: string

      Deprecated, use options.externalLayoutName instead.

    Returns null | RuntimeScene

  • Start the scene in options.sceneName, replacing the one currently being played. If options.clear is set to true, all running scenes are also removed from the stack of scenes.

    Parameters

    • options: string | ReplaceSceneOptions

      Contains the scene name and optional external layout name to instantiate.

    • Optional deprecatedClear: boolean

      Deprecated, use options.clear instead.

    Returns null | RuntimeScene

  • Parameters

    • sceneStackSyncData: SceneStackNetworkSyncData

    Returns void

  • Return true if a scene was loaded, false otherwise (i.e: game not yet started).

    Returns boolean