mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 19:13:37 +00:00
1 line
11 KiB
JSON
1 line
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,"pa
|