clik-engine API
    Preparing search index...

    Class ScriptedProvider

    Programmatic InputProvider — actions are driven by direct method calls instead of real keyboard / touch / gamepad events.

    Used by the multi-instance test harness so scenarios can simulate inputs without a DOM. Add to any InputManager via inputManager.addProvider(scripted) — the whole pipeline (action map, InputBuffer, combo detector, BaseScene.actions) works exactly as it does for real input.

    Two modes:

    • set(action, true|false) — sticky: stays in that state until changed
    • pulse(action, frames) — held down for the next N polled frames
    • apply(state) — bulk set from a { action: boolean } map
    • clear() — release everything
    const scripted = new ScriptedProvider();
    inputManager.addProvider(scripted);
    scripted.set('jump', true);
    scripted.pulse('attack', 3);

    Implements

    Index

    Constructors

    Methods