like2d
    Preparing search index...

    Module scene

    Scenes are a modular component of LÏKE based on setting like.handleEvent. The scene system is simple and powerful, once understood.

    For devs using the built-in callback pattern, they're an easy way to stack functionality on to the current project such as gamepad mapping or debug overlays.

    For multi-scene games, they codify a common state-management pattern based on switching between (or nesting) event handler callbacks. It's a lot better than switch-casing on each handler, or manually setting/clearing handler functions on each transition.

    Using scenes for your game also replaces the need to pass around global like or sceneManager wherever it is used.

    Get started: SceneManager

    Make your own scene: Scene

    Check out built-in utility scenes:

    Classes

    SceneManager

    Type Aliases

    Scene
    SceneEx
    SceneInstance