Handles repeating behavior when holding down a control action.
When the action is 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(action:Action, delay:Float = DEFAULT_DELAY, interval:Float = DEFAULT_INTERVAL, gamepadOnly:Bool = false):TurboActionHandler
Builds a TurboActionHandler 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 TurboActionHandler
Variables
read onlyactivated:Bool = false
Whether the action for this handler is pressed, and the handler is ready to repeat.