Handles repeating behavior when holding down a gamepad button or button combination.
When the inputs are pressed, activated will be true for the first frame,
then wait delay seconds before becoming true for one frame every interval seconds.
Example: Pressing Ctrl+Z will undo, while holding Ctrl+Z will start to undo repeatedly.
Static methods
staticinlinebuild(input:FlxGamepadInputID, delay:Float = DEFAULT_DELAY, interval:Float = DEFAULT_INTERVAL):TurboButtonHandler
staticinlinebuild(inputs:Array<FlxGamepadInputID>, delay:Float = DEFAULT_DELAY, interval:Float = DEFAULT_INTERVAL):TurboButtonHandler
Builds a TurboButtonHandler that monitors from a single input.
Parameters:
input | The input to monitor. |
|---|---|
delay | How long to wait before repeating. |
repeatDelay | How long to wait between repeats. |
Returns:
A TurboKeyHandler
Variables
read onlyactivated:Bool = false
Whether all of the keys for this handler are activated, and the handler is ready to repeat.