@kayelaa/canvas API - v0.2.15
    Preparing search index...

    Variable useCurrentGameConst

    useCurrentGame: () => KaylaInternals.KaylaGame = ...

    Returns the current game instance this entity belongs to.

    This hook MUST be called at the top level of a component function — never inside loops, conditions, nested functions, or callbacks. The call order of all hooks is strictly fixed across every refresh; reordering calls will corrupt internal state.

    Useful for accessing global timing, adding renderers/scenes dynamically, etc.

    Type Declaration

    const game = useCurrentGame();
    game.delay(3000).then(() => {
    spawnNextLevel();
    });