DeviceButton#justReleased()

justReleased(duration) → {boolean} Returns the "just released" state of this button.Just released is considered as being true if the button was released within the duration given (default 250ms). Parameters Name Type Argument Default Description duration number <optional> 250 The duration in ms below which the button is considered as being just released. Returns boolean - True if the button is just released otherwise false. Source code: input/DeviceButton.js (Line 244)

DeviceButton#justPressed()

justPressed(duration) → {boolean} Returns the "just pressed" state of this button.Just pressed is considered true if the button was pressed down within the duration given (default 250ms). Parameters Name Type Argument Default Description duration number <optional> 250 The duration in ms below which the button is considered as being just pressed. Returns boolean - True if the button is just pressed otherwise false. Source code: input/DeviceButton.js (Line 228)

DeviceButton#isUp

isUp : boolean The "up" state of the button. Default Value true Source code: input/DeviceButton.js (Line 59)

DeviceButton#isDown

isDown : boolean The "down" state of the button. Source code: input/DeviceButton.js (Line 53)

DeviceButton#game

game : Phaser.Game A reference to the currently running game. Source code: input/DeviceButton.js (Line 41)

DeviceButton#event

event : Object The DOM event that caused the change in button state. Source code: input/DeviceButton.js (Line 47)

DeviceButton#duration

[readonly] duration : number How long the button has been held down for in milliseconds.If not currently down it returns -1. Source code: input/DeviceButton.js (Line 300)

DeviceButton#DeviceButton

new DeviceButton(parent, buttonCode) DeviceButtons belong to both Phaser.Pointer and Phaser.SinglePad (Gamepad) instances. For Pointers they represent the various buttons that can exist on mice and pens, such as the left button, right button,middle button and advanced buttons like back and forward. Access them via Pointer.leftbutton, Pointer.rightButton and so on. On Gamepads they represent all buttons on the pad: from shoulder buttons to action buttons. At the time of writing this there are

DeviceButton#destroy()

destroy() Destroys this DeviceButton, this disposes of the onDown, onUp and onFloat signalsand clears the parent and game references. Source code: input/DeviceButton.js (Line 279)

DeviceButton#ctrlKey

ctrlKey : boolean True if the control key was held down when this button was last pressed or released.Not supported on Gamepads. Source code: input/DeviceButton.js (Line 103)