mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 19:13:37 +00:00
1 line
5.7 KiB
JSON
1 line
5.7 KiB
JSON
|
{"class":{"name":"Phaser.GamepadButton","extends":"","static":false,"constructor":true,"parameters":[{"name":"pad","type":["Phaser.SinglePad"],"help":"A reference to the gamepad that owns this button.","optional":false,"default":null},{"name":"buttonCode","type":["number"],"help":"The button code this GamepadButton is responsible for.","optional":false,"default":null}],"help":"If you need more fine-grained control over the handling of specific buttons you can create and use Phaser.GamepadButton objects."},"consts":[],"methods":{"public":[{"name":"destroy","static":false,"returns":null,"help":"Destroys this GamepadButton, this disposes of the onDown, onUp and onFloat signals and clears the pad and game references.","line":199,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"justPressed","static":false,"returns":{"types":["boolean"],"help":"True if the button is just pressed otherwise false."},"help":"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).","line":171,"public":true,"protected":false,"private":false,"parameters":[{"name":"duration","type":["number"],"help":"The duration below which the button is considered as being just released.","optional":true,"default":"250"}],"inherited":false,"inheritedFrom":""},{"name":"reset","static":false,"returns":null,"help":"Resets this GamepadButton, changing it to an isUp state and resetting the duration and repeats counters.","line":184,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"protected":[{"name":"processButtonDown","static":false,"returns":null,"help":"Called automatically by Phaser.SinglePad.","line":103,"public":false,"protected":true,"private":false,"parameters":[{"name":"value","type":["number"],"help":"Button value","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"processButtonFloat","static":false,"returns":null,"help":"Called automatically by Phaser.SinglePad.","line":141,"public":false,"protected":true,"private":false,"parameters":[{"name":"value","type":["number"],"help":"Button value","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"processButtonUp","static":false,"returns":null,"help":"Called automatically by Phaser.SinglePad.","line":123,"public":false,"protected":true,"private":false,"parameters":[{"name":"value","type":["number"],"help":"Button value","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"private":[],"static":[]},"properties":{"public":[{"name":"buttonCode","type":["number"],"help":"","inlineHelp":"The buttoncode of this button.","line":75,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"duration","type":["number"],"help":"If the button is down this value holds the duration of that button press and is constantly updated.\\nIf the button is up it holds the duration of the previous down session.","inlineHelp":"The number of milliseconds this button has been held down for.","line":52,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"A reference to the currently running game.","line":26,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"isDown","type":["boolean"],"help":"","inlineHelp":"The \"down\" state of the button.","line":32,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"isUp","type":["boolean"],"help":"","inlineHelp":"The \"up\" state of the button.","line":38,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onDown","type":["Phaser.Signal"],"help":"","inlineHelp":"This Signal is dispatched every time this GamepadButton is pressed down. It is only dispatched once (until the button is released again).","line":80,"default":null,"public":true,"protected":false,"private":false,"
|