mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 19:13:37 +00:00
1 line
10 KiB
JSON
1 line
10 KiB
JSON
|
{"class":{"name":"Phaser.Gamepad","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"A reference to the currently running game.","optional":false,"default":null}],"help":"The Gamepad class handles looking after gamepad input for your game.\\nRemember to call gamepad.start(); expecting input!\\n\\nHTML5 GAMEPAD API SUPPORT IS AT AN EXPERIMENTAL STAGE!\\nAt moment of writing this (end of 2013) only Chrome supports parts of it out of the box. Firefox supports it\\nvia prefs flags (about:config, search gamepad). The browsers map the same controllers differently.\\nThis class has constants for Windows 7 Chrome mapping of XBOX 360 controller."},"consts":[],"methods":{"public":[{"name":"addCallbacks","static":false,"returns":null,"help":"Add callbacks to the main Gamepad handler to handle connect\/disconnect\/button down\/button up\/axis change\/float value buttons\\nonConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback","line":145,"public":true,"protected":false,"private":false,"parameters":[{"name":"context","type":["object"],"help":"The context under which the callbacks are run.","optional":false,"default":null},{"name":"callbacks","type":["object"],"help":"Object that takes six different callback methods:","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"destroy","static":false,"returns":null,"help":"Destroys this object and the associated event listeners.","line":468,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"isDown","static":false,"returns":{"types":["boolean"],"help":"True if a button is currently down."},"help":"Returns true if the button is currently pressed down, on ANY gamepad.","line":450,"public":true,"protected":false,"private":false,"parameters":[{"name":"buttonCode","type":["number"],"help":"The buttonCode of the button to check for.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"justPressed","static":false,"returns":{"types":["boolean"],"help":"True if the button is just released otherwise false."},"help":"Returns the \"just released\" state of a button from ANY gamepad connected. Just released is considered as being true if the button was released within the duration given (default 250ms).","line":430,"public":true,"protected":false,"private":false,"parameters":[{"name":"buttonCode","type":["number"],"help":"The buttonCode of the button to check for.","optional":false,"default":null},{"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":"Reset all buttons\/axes of all gamepads","line":391,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"setDeadZones","static":false,"returns":null,"help":"Sets the deadZone variable for all four gamepads","line":364,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"start","static":false,"returns":null,"help":"Starts the Gamepad event handling.\\nThis MUST be called manually before Phaser will start polling the Gamepad API.","line":165,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"stop","static":false,"returns":null,"help":"Stops the Gamepad event handling.","line":378,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"protected":[{"name":"update","static":false,"returns":null,"help":"Main gamepad update loop. Should not be called manually.","line":233,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"private":[{"name":"_pollGamepads","static":false,"returns":null,"help":"Updating connected gamepads (for Google Chrome). Should not be called manually.","line":250,"pub
|