phaser/v2/resources/docgen/output/Phaser.Key.json

1 line
6.7 KiB
JSON
Raw Normal View History

{"class":{"name":"Phaser.Key","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"Current game instance.","optional":false,"default":null},{"name":"keycode","type":["number"],"help":"The key code this Key is responsible for.","optional":false,"default":null}],"help":"If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects."},"consts":[],"methods":{"public":[{"name":"justPressed","static":false,"returns":{"types":["boolean"],"help":"True if the key is just pressed otherwise false."},"help":"Returns the \"just pressed\" state of the Key. Just pressed is considered true if the key was pressed down within the duration given.","line":225,"public":true,"protected":false,"private":false,"parameters":[{"name":"duration","type":["number"],"help":"The duration below which the key is considered as being just pressed.","optional":true,"default":"50"}],"inherited":false,"inheritedFrom":""},{"name":"justReleased","static":false,"returns":{"types":["boolean"],"help":"True if the key is just released otherwise false."},"help":"Returns the \"just released\" state of the Key. Just released is considered as being true if the key was released within the duration given.","line":239,"public":true,"protected":false,"private":false,"parameters":[{"name":"duration","type":["number"],"help":"The duration below which the key is considered as being just released.","optional":true,"default":"50"}],"inherited":false,"inheritedFrom":""},{"name":"reset","static":false,"returns":null,"help":"Resets the state of this Key. This sets isDown to false, isUp to true, resets the time to be the current time and clears any callbacks\\nassociated with the onDown and onUp events and nulls the onHoldCallback if set.","line":199,"public":true,"protected":false,"private":false,"parameters":[{"name":"hard","type":["boolean"],"help":"A soft reset won't reset any events or callbacks that are bound to this Key. A hard reset will.","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""}],"protected":[{"name":"processKeyDown","static":false,"returns":null,"help":"Called automatically by Phaser.Keyboard.","line":141,"public":false,"protected":true,"private":false,"parameters":[{"name":"event.","type":["KeyboardEvent"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"processKeyUp","static":false,"returns":null,"help":"Called automatically by Phaser.Keyboard.","line":172,"public":false,"protected":true,"private":false,"parameters":[{"name":"event.","type":["KeyboardEvent"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"private":[],"static":[]},"properties":{"public":[{"name":"altKey","type":["boolean"],"help":"","inlineHelp":"The down state of the ALT key, if pressed at the same time as this key.","line":50,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"ctrlKey","type":["boolean"],"help":"","inlineHelp":"The down state of the CTRL key, if pressed at the same time as this key.","line":56,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"duration","type":["number"],"help":"If the key is down this value holds the duration of that key press and is constantly updated.\\nIf the key is up it holds the duration of the previous down session.","inlineHelp":"The number of milliseconds this key has been held down for.","line":75,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"enabled","type":["boolean"],"help":"","inlineHelp":"An enabled key processes its update and dispatches events. You can toggle this at run-time to disable a key without deleting it.","line":26,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"event","type":["object"],"help":"","inlineHelp":"Stores the most recent DOM event.","line":32,"default":null,"public":true,"protected":false,"private":false,"readOnly":true},{"name":"game","type":["Phas