Phaser API Documentation

  Version: 
<static> UpDuration(key, [duration])

Description:

Returns true if the Key was released within the duration value given, based on the current game clock time. Or returns false if it either isn't up, or was released longer ago than the given duration.

Parameters:

name type arguments Default description
key Phaser.Input.Keyboard.Key

The Key object to test.

duration number <optional> 50

The duration, in ms, within which the key must have been released.

Returns:
Description:

true if the Key was released within duration ms ago, otherwise false.

Type:
  • boolean
Since: 3.0.0