mirror of
https://github.com/photonstorm/phaser
synced 2024-12-21 02:23:29 +00:00
1 line
No EOL
10 KiB
JSON
1 line
No EOL
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,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"onGamepadConnected","static":false,"returns":null,"help":"Handles the connection of a Gamepad.","line":197,"public":false,"protected":false,"private":true,"parameters":[{"name":"event","type":["object"],"help":"The DOM event.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"onGamepadDisconnected","static":false,"returns":null,"help":"Handles the disconnection of a Gamepad.","line":212,"public":false,"protected":false,"private":true,"parameters":[{"name":"event","type":["object"],"help":"The DOM event.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"static":[]},"properties":{"public":[{"name":"active","type":["boolean"],"help":"If the gamepad input is active or not - if not active it should not be updated from Input.js","inlineHelp":"If the gamepad input is active or not.","line":489,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"callbackContext","type":["object"],"help":"","inlineHelp":"The context under which the callbacks are run.","line":79,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"disabled","type":["boolean"],"help":"You can disable all Gamepad Input by setting disabled to true. While true all new input related events will be ignored.","inlineHelp":"The disabled state of the Gamepad.","line":51,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"Local reference to game.","line":25,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onAxisCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time any gamepad axis is changed.","line":104,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onConnectCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time any gamepad is connected","line":84,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onDisconnectCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time any gamepad is disconnected","line":89,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onDownCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time any gamepad button is pressed down.","line":94,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onFloatCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time any gamepad button is changed to a value where value > 0 and value < 1.","line":109,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onUpCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time any gamepad button is released.","line":99,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"pad1","type":["Phaser.SinglePad"],"help":"Gamepad #1","inlineHelp":"Gamepad #1;","line":531,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"pad2","type":["Phaser.SinglePad"],"help":"Gamepad #2","inlineHelp":"Gamepad #2","line":545,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"pad3","type":["Phaser.SinglePad"],"help":"Gamepad #3","inlineHelp":"Gamepad #3","line":559,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"pad4","type":["Phaser.SinglePad"],"help":"Gamepad #4","inlineHelp":"Gamepad #4","line":573,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"padsConnected","type":["number"],"help":"How many live gamepads are currently connected.","inlineHelp":"How many live gamepads are currently connected.","line":517,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"supported","type":["boolean"],"help":"Whether or not gamepads are supported in current browser.","inlineHelp":"Whether or not gamepads are supported in current browser.","line":503,"default":null,"public":true,"protected":false,"private":false,"readOnly":true}],"protected":[],"private":[{"name":"_active","type":["boolean"],"help":"","inlineHelp":"Private flag for whether or not the API is polled","line":44,"default":"false","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_gamepadIndexMap","type":["object"],"help":"","inlineHelp":"Maps the browsers gamepad indices to our Phaser Gamepads","line":31,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_gamepadSupportAvailable","type":["boolean"],"help":"Whether or not gamepads are supported in the current browser. Note that as of Dec. 2013 this check is actually not accurate at all due to poor implementation.","inlineHelp":"Are gamepads supported in this browser or not?","line":58,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_gamepaddisconnected","type":["function"],"help":"","inlineHelp":"Private callback for Firefox gamepad connection handling","line":121,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_gamepads","type":["array Phaser.SinglePad"],"help":"","inlineHelp":"The four Phaser Gamepads.","line":127,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_ongamepadconnected","type":["function"],"help":"","inlineHelp":"Private callback for Firefox gamepad connection handling","line":115,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_prevRawGamepadTypes","type":["array"],"help":"Used to check for differences between earlier polls and current state of gamepads.","inlineHelp":"","line":66,"default":"[]","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_prevTimestamps","type":["array"],"help":"Used to check for differences between earlier polls and current state of gamepads.","inlineHelp":"","line":74,"default":"[]","public":false,"protected":false,"private":true,"readOnly":false},{"name":"_rawPads","type":["array"],"help":"","inlineHelp":"The raw state of the gamepads from the browser","line":37,"default":null,"public":false,"protected":false,"private":true,"readOnly":false}]}} |