ControlParams: {
    call_once?: boolean;
    loop_config?: {
        horizontal?: boolean;
        horizontal_time?: number;
        shoulder?: boolean;
        shoulder_time?: number;
        vertical?: boolean;
        vertical_time?: number;
    };
    no_initial_reset?: boolean;
    persist?: boolean;
}

Type declaration

  • Optional call_once?: boolean

    The passed callbacks will be called just once and then automatically unbound. ControlManager.reset has no effect over it. Use ControlManager.detach_bindings to detach bindings in the case it's not necessary to call the callbacks anymore. If this parameter is true, "persist", "reset_controls" and "no_initial_reset" have no effect. Don't work for loops.

  • Optional loop_config?: {
        horizontal?: boolean;
        horizontal_time?: number;
        shoulder?: boolean;
        shoulder_time?: number;
        vertical?: boolean;
        vertical_time?: number;
    }
    • Optional horizontal?: boolean
    • Optional horizontal_time?: number
    • Optional shoulder?: boolean
    • Optional shoulder_time?: number
    • Optional vertical?: boolean
    • Optional vertical_time?: number
  • Optional no_initial_reset?: boolean

    Whether to reset the current controls before attaching new ones. Only works for controls set with "persist" false. When setting this to true, use it wiselly.

  • Optional persist?: boolean

    Whether the bindings set must persist even if ControlManager.reset is called. If true, ControlManager.detach_bindings need to be called to disable these controls.