mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
1 line
No EOL
11 KiB
JSON
1 line
No EOL
11 KiB
JSON
{"class":{"name":"Phaser.SinglePad","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"Current game instance.","optional":false,"default":null},{"name":"padParent","type":["object"],"help":"The parent Phaser.Gamepad object (all gamepads reside under this)","optional":false,"default":null}],"help":"A single Phaser Gamepad"},"consts":[],"methods":{"public":[{"name":"addCallbacks","static":false,"returns":null,"help":"Add callbacks to the this Gamepad to handle connect \/ disconnect \/ button down \/ button up \/ axis change \/ float value buttons.\\n\\nonConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback","line":129,"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 callbak methods:","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"axis","static":false,"returns":{"types":["number"],"help":"Axis value if available otherwise false"},"help":"Returns value of requested axis.","line":438,"public":true,"protected":false,"private":false,"parameters":[{"name":"axisCode","type":["number"],"help":"The index of the axis to check","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"buttonValue","static":false,"returns":{"types":["number"],"help":"Button value if available otherwise null. Be careful as this can incorrectly evaluate to 0."},"help":"Returns the value of a gamepad button. Intended mainly for cases when you have floating button values, for example\\nanalog trigger buttons on the XBOX 360 controller.","line":527,"public":true,"protected":false,"private":false,"parameters":[{"name":"buttonCode","type":["number"],"help":"The buttonCode of the button to check.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"connect","static":false,"returns":null,"help":"Gamepad connect function, should be called by Phaser.Gamepad.","line":221,"public":true,"protected":false,"private":false,"parameters":[{"name":"rawPad","type":["object"],"help":"The raw gamepad object","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"destroy","static":false,"returns":null,"help":"Destroys this object and associated callback references.","line":302,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"disconnect","static":false,"returns":null,"help":"Gamepad disconnect function, should be called by Phaser.Gamepad.","line":264,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"getButton","static":false,"returns":{"types":["Phaser.GamepadButton"],"help":"The GamepadButton object which you can store locally and reference directly."},"help":"Gets a GamepadButton object from this controller to be stored and referenced locally.\\nThe GamepadButton object can then be polled, have events attached to it, etc.","line":151,"public":true,"protected":false,"private":false,"parameters":[{"name":"buttonCode","type":["number"],"help":"The buttonCode of the button, i.e. Phaser.Gamepad.BUTTON_0, Phaser.Gamepad.XBOX360_A, etc.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"isDown","static":false,"returns":{"types":["boolean"],"help":"True if the button is pressed down."},"help":"Returns true if the button is pressed down.","line":456,"public":true,"protected":false,"private":false,"parameters":[{"name":"buttonCode","type":["number"],"help":"The buttonCode of the button to check.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"isUp","static":false,"returns":{"types":["boolean"],"help":"True if the button is not currently pressed down."},"help":"Returns true if the button is not currently pressed.","line":474,"public":true,"protected":false,"private":false,"parameters":[{"name":"buttonCode","type":["number"],"help":"The buttonCode of the button to check.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"justPressed","static":false,"returns":{"types":["boolean"],"help":"True if the button is just pressed otherwise false."},"help":"Returns the \"just pressed\" state of a button from this gamepad. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).","line":510,"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 pressed.","optional":true,"default":"250"}],"inherited":false,"inheritedFrom":""},{"name":"justReleased","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 this gamepad. Just released is considered as being true if the button was released within the duration given (default 250ms).","line":493,"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":"pollStatus","static":false,"returns":null,"help":"Main update function called by Phaser.Gamepad.","line":169,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"processAxisChange","static":false,"returns":null,"help":"Handles changes in axis.","line":332,"public":true,"protected":false,"private":false,"parameters":[{"name":"axisState","type":["object"],"help":"State of the relevant axis","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"processButtonDown","static":false,"returns":null,"help":"Handles button down press.","line":360,"public":true,"protected":false,"private":false,"parameters":[{"name":"buttonCode","type":["number"],"help":"Which buttonCode of this button","optional":false,"default":null},{"name":"value","type":["object"],"help":"Button value","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"processButtonFloat","static":false,"returns":null,"help":"Handles buttons with floating values (like analog buttons that acts almost like an axis but still registers like a button)","line":412,"public":true,"protected":false,"private":false,"parameters":[{"name":"buttonCode","type":["number"],"help":"Which buttonCode of this button","optional":false,"default":null},{"name":"value","type":["object"],"help":"Button value (will range somewhere between 0 and 1, but not specifically 0 or 1.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"processButtonUp","static":false,"returns":null,"help":"Handles button release.","line":386,"public":true,"protected":false,"private":false,"parameters":[{"name":"buttonCode","type":["number"],"help":"Which buttonCode of this button","optional":false,"default":null},{"name":"value","type":["object"],"help":"Button value","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"reset","static":false,"returns":null,"help":"Reset all buttons\/axes of this gamepad.","line":543,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[],"static":[]},"properties":{"public":[{"name":"callbackContext","type":["object"],"help":"","inlineHelp":"The context under which the callbacks are run.","line":38,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"connected","type":["boolean"],"help":"","inlineHelp":"Whether or not this particular gamepad is connected or not.","line":33,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"deadZone","type":["number"],"help":"","inlineHelp":"Dead zone for axis feedback - within this value you won't trigger updates.","line":73,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"Local reference to game.","line":21,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"index","type":["number"],"help":"","inlineHelp":"The gamepad index as per browsers data","line":27,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"onAxisCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time an axis is changed.","line":63,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onConnectCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time this gamepad is connected","line":43,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onDisconnectCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time this gamepad is disconnected","line":48,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onDownCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time a button is pressed down.","line":53,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onFloatCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time a button is changed to a value where value > 0 and value < 1.","line":68,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onUpCallback","type":["function"],"help":"","inlineHelp":"This callback is invoked every time a gamepad button is released.","line":58,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[{"name":"_axes","type":["array"],"help":"","inlineHelp":"Current axes state.","line":109,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_axesLen","type":["number"],"help":"","inlineHelp":"Length of the _axes array.","line":115,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_buttons","type":["array"],"help":"","inlineHelp":"Array of Phaser.GamepadButton objects. This array is populated when the gamepad is connected.","line":97,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_buttonsLen","type":["number"],"help":"","inlineHelp":"Length of the _buttons array.","line":103,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_prevTimestamp","type":["number"],"help":"","inlineHelp":"Used to check for differences between earlier polls and current state of gamepads.","line":91,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_rawPad","type":["object"],"help":"","inlineHelp":"The 'raw' gamepad data.","line":85,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"padParent","type":["Phaser.Gamepad"],"help":"","inlineHelp":"Main Phaser Gamepad object","line":79,"default":null,"public":false,"protected":false,"private":true,"readOnly":false}]}} |