UNPKG

@rbxts/mechanism

Version:

An elegant composable input library for Roblox

17 lines (16 loc) 718 B
import Destroyable from "@rbxts/destroyable"; import { BaseAction } from "./base-action"; type Maybe<T> = T | undefined; type AbstractConstructor<T = object> = abstract new (...args: never[]) => T; export declare class InputManager extends Destroyable { private readonly useAllGamepads; private readonly registeredActions; constructor(useAllGamepads?: boolean); getActionByID<T extends BaseAction = BaseAction>(actionID: string | number, actionType?: AbstractConstructor<T>): Maybe<T>; bind(action: BaseAction): InputManager; unbind(actionID: string | number): InputManager; unbind(action: BaseAction): InputManager; private handleInput; private isUsingUnknownGamepad; } export {};