Files
dusk/types/scene.d.ts
T
2026-06-01 23:04:55 -05:00

31 lines
836 B
TypeScript

/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
/** Scene management — request scene transitions and query the active scene. */
interface SceneNamespace {
/** The type constant of the currently active scene, or 0 if none. */
readonly current: number;
/**
* Requests a scene transition. The change takes effect at the start of the
* next safe update tick (current scene is disposed, new scene is initialized).
*
* @param type - A `Scene.*` scene type constant.
*
* @example
* Scene.set(Scene.OVERWORLD);
*/
set(type: number): void;
// Scene type constants (generated from scenelist.h)
readonly INITIAL: number;
readonly TEST: number;
readonly OVERWORLD: number;
}
declare var Scene: SceneNamespace;