@rbxts/mechanism
Version:
An elegant composable input library for Roblox
22 lines (21 loc) • 1.19 kB
TypeScript
import { StandardAction } from "./standard-action";
export declare abstract class RepeatAction extends StandardAction {
readonly repeats: number;
readonly timing: number;
private repeatCount;
private lastTap;
/** @hidden */
handleInput(input: InputObject, processed: boolean, isPress?: boolean): void;
}
export declare class RepeatActionBuilder extends RepeatAction {
/** Sets the ID of the action */
setID(this: Writable<RepeatActionBuilder>, id: string | number): RepeatActionBuilder;
/** Sets whether the action is activated when gameProcessedEvent is true */
setProcessed(this: Writable<RepeatActionBuilder>, processed: boolean): RepeatActionBuilder;
/** Sets a time to wait between each activation of the action */
setCooldown(this: Writable<RepeatActionBuilder>, cooldown: number): RepeatActionBuilder;
/** Sets the amount of times the input needs to be repeated to activate the action */
setRepeats(this: Writable<RepeatActionBuilder>, repeats: number): RepeatActionBuilder;
/** Sets the maximum time in between repeated inputs */
setTiming(this: Writable<RepeatActionBuilder>, timing: number): RepeatActionBuilder;
}