mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 11:03:23 +00:00
1 line
23 KiB
JSON
1 line
23 KiB
JSON
|
{"class":{"name":"Phaser.Input","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"Current game instance.","optional":false,"default":null}],"help":"Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer.\\nThe Input manager is updated automatically by the core game loop."},"consts":[{"name":"MOUSE_OVERRIDES_TOUCH","type":"number","help":"","line":318},{"name":"MOUSE_TOUCH_COMBINE","type":"number","help":"","line":330},{"name":"TOUCH_OVERRIDES_MOUSE","type":"number","help":"","line":324}],"methods":{"public":[{"name":"addMoveCallback","static":false,"returns":{"types":["number"],"help":"The index of the callback entry. Use this index when calling Input.deleteMoveCallback."},"help":"Adds a callback that is fired every time the activePointer receives a DOM move event such as a mousemove or touchmove.\\nIt will be called every time the activePointer moves, which in a multi-touch game can be a lot of times, so this is best\\nto only use if you've limited input to a single pointer (i.e. mouse or touch).\\nThe callback is added to the Phaser.Input.moveCallbacks array and should be removed with Phaser.Input.deleteMoveCallback.","line":406,"public":true,"protected":false,"private":false,"parameters":[{"name":"callback","type":["function"],"help":"The callback that will be called each time the activePointer receives a DOM move event.","optional":false,"default":null},{"name":"context","type":["object"],"help":"The context in which the callback will be called.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"addPointer","static":false,"returns":{"types":["Phaser.Pointer"],"help":"A reference to the new Pointer object that was created."},"help":"Add a new Pointer object to the Input Manager. By default Input creates 3 pointer objects: mousePointer, pointer1 and pointer2.\\nIf you need more then use this to create a new one, up to a maximum of 10.","line":433,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"deleteMoveCallback","static":false,"returns":null,"help":"Removes the callback at the defined index from the Phaser.Input.moveCallbacks array","line":418,"public":true,"protected":false,"private":false,"parameters":[{"name":"index","type":["number"],"help":"The index of the callback to remove.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"destroy","static":false,"returns":null,"help":"Stops all of the Input Managers from running.","line":383,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"getLocalPosition","static":false,"returns":{"types":["Phaser.Point"],"help":"A point containing the coordinates of the Pointer position relative to the DisplayObject."},"help":"This will return the local coordinates of the specified displayObject based on the given Pointer.","line":771,"public":true,"protected":false,"private":false,"parameters":[{"name":"displayObject","type":["Phaser.Sprite","Phaser.Image"],"help":"The DisplayObject to get the local coordinates for.","optional":false,"default":null},{"name":"pointer","type":["Phaser.Pointer"],"help":"The Pointer to use in the check against the displayObject.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"getPointer","static":false,"returns":{"types":["Phaser.Pointer"],"help":"A Pointer object or null if no Pointer object matches the requested state."},"help":"Get the next Pointer object whos active property matches the given state","line":668,"public":true,"protected":false,"private":false,"parameters":[{"name":"state","type":["boolean"],"help":"The state the Pointer should be in (false for inactive, true for active).","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"getPointerFromId","static":false,"returns":{"types":["Phaser.Pointer"],"help":"A Pointer object or null if no Pointer object matches the requested identif
|