Key#reset()

reset(hard)

Resets the state of this Key.

This sets isDown to false, isUp to true, resets the time to be the current time, and enables the key.
In addition, if it is a "hard reset", it clears clears any callbacks associated with the onDown and onUp events and removes the onHoldCallback.

Parameters
Name Type Argument Default Description
hard boolean <optional>
true

A soft reset won't reset any events or callbacks; a hard reset will.

Source code: input/Key.js (Line 222)
doc_phaser
2017-02-14 10:53:43
Comments
Leave a Comment

Please login to continue.