Handles repeating behavior when holding down a key or key combination.
When the keys 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(inputKey:FlxKey, delay:Float = DEFAULT_DELAY, interval:Float = DEFAULT_INTERVAL):TurboKeyHandler
staticinlinebuild(inputKeys:Array<FlxKey>, delay:Float = DEFAULT_DELAY, interval:Float = DEFAULT_INTERVAL):TurboKeyHandler
Builds a TurboKeyHandler that monitors from a single key.
Parameters:
inputKey | The key 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.