scene(name: SceneName, def: SceneDef): void

Define a scene.

paramname- The scene name.

paramdef- The scene definition.

// define a scene
scene("game", () => {
// ...
});

// get options
scene("game", (opts) => {
    debug.log(opts.level);
});
kaplay logo

Misc

Layer