mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
1 line
No EOL
6.7 KiB
JSON
Executable file
1 line
No EOL
6.7 KiB
JSON
Executable file
{"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":["Phaser.Game"],"help":"","inlineHelp":"A reference to the currently running game.","line":20,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"isDown","type":["boolean"],"help":"","inlineHelp":"The \"down\" state of the key.","line":38,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"isUp","type":["boolean"],"help":"","inlineHelp":"The \"up\" state of the key.","line":44,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"keyCode","type":["number"],"help":"","inlineHelp":"The keycode of this key.","line":92,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onDown","type":["Phaser.Signal"],"help":"","inlineHelp":"This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).","line":97,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onHoldCallback","type":["function"],"help":"","inlineHelp":"A callback that is called while this Key is held down. Warning: Depending on refresh rate that could be 60+ times per second.","line":102,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onHoldContext","type":["object"],"help":"","inlineHelp":"The context under which the onHoldCallback will be called.","line":107,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onUp","type":["Phaser.Signal"],"help":"","inlineHelp":"This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).","line":112,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"repeats","type":["number"],"help":"","inlineHelp":"If a key is held down this holds down the number of times the key has 'repeated'.","line":87,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"shiftKey","type":["boolean"],"help":"","inlineHelp":"The down state of the SHIFT key, if pressed at the same time as this key.","line":62,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"timeDown","type":["number"],"help":"","inlineHelp":"The timestamp when the key was last pressed down. This is based on Game.time.now.","line":67,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"timeUp","type":["number"],"help":"","inlineHelp":"The timestamp when the key was last released. This is based on Game.time.now.","line":81,"default":"-2500","public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[]}} |