No longer required.

This commit is contained in:
Richard Davey 2018-12-05 15:58:53 +00:00
parent dd051ddc03
commit 7431f0a621
2 changed files with 0 additions and 90 deletions

View file

@ -1,49 +0,0 @@
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Used internally by the Keyboard Plugin.
*
* @function Phaser.Input.Keyboard.ProcessKeyDown
* @private
* @since 3.0.0
*
* @param {Phaser.Input.Keyboard.Key} key - The Key to process the event for.
* @param {KeyboardEvent} event - The native Keyboard event.
*
* @return {Phaser.Input.Keyboard.Key} The Key that was processed.
*/
var ProcessKeyDown = function (key, event)
{
key.originalEvent = event;
if (!key.enabled)
{
return;
}
key.altKey = event.altKey;
key.ctrlKey = event.ctrlKey;
key.shiftKey = event.shiftKey;
key.metaKey = event.metaKey;
key.location = event.location;
if (key.isDown === false)
{
key.isDown = true;
key.isUp = false;
key.timeDown = event.timeStamp;
key.duration = 0;
key._justDown = true;
key._justUp = false;
}
key.repeats++;
return key;
};
module.exports = ProcessKeyDown;

View file

@ -1,41 +0,0 @@
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Used internally by the Keyboard Plugin.
*
* @function Phaser.Input.Keyboard.ProcessKeyUp
* @private
* @since 3.0.0
*
* @param {Phaser.Input.Keyboard.Key} key - The Key to process the event for.
* @param {KeyboardEvent} event - The native Keyboard event.
*
* @return {Phaser.Input.Keyboard.Key} The Key that was processed.
*/
var ProcessKeyUp = function (key, event)
{
key.originalEvent = event;
if (!key.enabled)
{
return;
}
key.isDown = false;
key.isUp = true;
key.timeUp = event.timeStamp;
key.duration = key.timeUp - key.timeDown;
key.repeats = 0;
key._justDown = false;
key._justUp = true;
key._tick = -1;
return key;
};
module.exports = ProcessKeyUp;