mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
jsdoc fixes and removed un-used ResetKey file.
This commit is contained in:
parent
504ba9e133
commit
32ce8d7947
7 changed files with 105 additions and 116 deletions
|
@ -84,7 +84,7 @@ var TimeStep = new Class({
|
|||
* the TimeStep is actually stopped, not just paused.
|
||||
*
|
||||
* @name Phaser.Boot.TimeStep#running
|
||||
* @name {boolean}
|
||||
* @type {boolean}
|
||||
* @readOnly
|
||||
* @default false
|
||||
* @since 3.0.0
|
||||
|
@ -109,7 +109,7 @@ var TimeStep = new Class({
|
|||
* is spiraling out of control.
|
||||
*
|
||||
* @name Phaser.Boot.TimeStep#targetFps
|
||||
* @name {integer}
|
||||
* @type {integer}
|
||||
* @default 60
|
||||
* @since 3.0.0
|
||||
*/
|
||||
|
|
|
@ -56,7 +56,7 @@ var LineCurve = new Class({
|
|||
/**
|
||||
* [description]
|
||||
*
|
||||
* @property Phaser.Curves.LineCurve#p1
|
||||
* @name Phaser.Curves.LineCurve#p1
|
||||
* @type {Phaser.Math.Vector2}
|
||||
* @since 3.0.0
|
||||
*/
|
||||
|
|
|
@ -6,32 +6,28 @@
|
|||
|
||||
var GetValue = require('../../utils/object/GetValue');
|
||||
|
||||
// * @param {number} characterWidth - The width of each character in the font set.
|
||||
// * @param {number} characterHeight - The height of each character in the font set.
|
||||
// * @param {string} chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements.
|
||||
// * @param {number} [charsPerRow] - The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth.
|
||||
// * @param {number} [xSpacing=0] - If the characters in the font set have horizontal spacing between them set the required amount here.
|
||||
// * @param {number} [ySpacing=0] - If the characters in the font set have vertical spacing between them set the required amount here.
|
||||
// * @param {number} [xOffset=0] - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.
|
||||
// * @param {number} [yOffset=0] - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.
|
||||
// Phaser.GameObject.RetroFont = function (game, key, characterWidth, characterHeight, chars, charsPerRow, xSpacing, ySpacing, xOffset, yOffset)
|
||||
|
||||
// {
|
||||
// image: key,
|
||||
// width: 32,
|
||||
// height: 32,
|
||||
// chars: 'string',
|
||||
// charsPerRow: null,
|
||||
// spacing: { x: 0, y: 0 },
|
||||
// offset: { x: 0, y: 0 }
|
||||
// }
|
||||
/**
|
||||
* @typedef {object} Phaser.GameObjects.BitmapText.ParseRetroFont.RetroFontConfig
|
||||
*
|
||||
* @property {string} image - [description]
|
||||
* @property {number} offset.x - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.
|
||||
* @property {number} offset.y - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.
|
||||
* @property {number} width - The width of each character in the font set.
|
||||
* @property {number} height - The height of each character in the font set.
|
||||
* @property {string} chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements.
|
||||
* @property {number} charsPerRow - The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth.
|
||||
* @property {number} spacing.x - If the characters in the font set have horizontal spacing between them set the required amount here.
|
||||
* @property {number} spacing.y - If the characters in the font set have vertical spacing between them set the required amount here.
|
||||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
*
|
||||
* @function ParseRetroFont
|
||||
* @function Phaser.GameObjects.BitmapText.ParseRetroFont
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*
|
||||
* @param {Phaser.Scene} scene - A reference to the Phaser Scene.
|
||||
* @param {Phaser.GameObjects.BitmapText.ParseRetroFont.RetroFontConfig} config - The font configuration object.
|
||||
*/
|
||||
var ParseRetroFont = function (scene, config)
|
||||
{
|
||||
|
@ -117,80 +113,91 @@ var ParseRetroFont = function (scene, config)
|
|||
};
|
||||
|
||||
/**
|
||||
* Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
|
||||
*
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET1
|
||||
* @type {string}
|
||||
*/
|
||||
ParseRetroFont.TEXT_SET1 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~';
|
||||
|
||||
/**
|
||||
* Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
*
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET2
|
||||
* @type {string}
|
||||
*/
|
||||
ParseRetroFont.TEXT_SET2 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
|
||||
/**
|
||||
* Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET3
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
ParseRetroFont.TEXT_SET3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ';
|
||||
|
||||
/**
|
||||
* Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
|
||||
*
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET4
|
||||
* @type {string}
|
||||
*/
|
||||
ParseRetroFont.TEXT_SET4 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789';
|
||||
|
||||
/**
|
||||
* Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789
|
||||
*
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET5
|
||||
* @type {string}
|
||||
*/
|
||||
ParseRetroFont.TEXT_SET5 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \'!?-*:0123456789';
|
||||
|
||||
/**
|
||||
* Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.'
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.'
|
||||
*
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET6
|
||||
* @type {string}
|
||||
* /
|
||||
ParseRetroFont.TEXT_SET6 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.\' ';
|
||||
|
||||
/**
|
||||
* Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39
|
||||
*
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET7
|
||||
* @type {string}
|
||||
*/
|
||||
ParseRetroFont.TEXT_SET7 = 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-\'39';
|
||||
|
||||
/**
|
||||
* Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
*
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET8
|
||||
* @type {string}
|
||||
*/
|
||||
ParseRetroFont.TEXT_SET8 = '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
|
||||
/**
|
||||
* Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!
|
||||
*
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET9
|
||||
* @type {string}
|
||||
*/
|
||||
ParseRetroFont.TEXT_SET9 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\'"?!';
|
||||
|
||||
/**
|
||||
* Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
*
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET10
|
||||
* @type {string}
|
||||
*/
|
||||
ParseRetroFont.TEXT_SET10 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
|
||||
/**
|
||||
* Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789
|
||||
* @constant
|
||||
* @type {string}
|
||||
*/
|
||||
* Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789
|
||||
*
|
||||
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET11
|
||||
* @type {string}
|
||||
*/
|
||||
ParseRetroFont.TEXT_SET11 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()\':;0123456789';
|
||||
|
||||
module.exports = ParseRetroFont;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
var Class = require('../../../utils/Class');
|
||||
var ResetKey = require('./ResetKey');
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
|
@ -185,6 +186,33 @@ var Key = new Class({
|
|||
* @since 3.0.0
|
||||
*/
|
||||
this._justUp = false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets this Key object back to its default un-pressed state.
|
||||
*
|
||||
* @method Phaser.Input.Keyboard.Key.reset
|
||||
* @since 3.5.2
|
||||
*
|
||||
* @return {Phaser.Input.Keyboard.Key} This Key instance.
|
||||
*/
|
||||
reset: function ()
|
||||
{
|
||||
this.preventDefault = true;
|
||||
this.enabled = true;
|
||||
this.isDown = false;
|
||||
this.isUp = true;
|
||||
this.altKey = false;
|
||||
this.ctrlKey = false;
|
||||
this.shiftKey = false;
|
||||
this.timeDown = 0;
|
||||
this.duration = 0;
|
||||
this.timeUp = 0;
|
||||
this.repeats = 0;
|
||||
this._justDown = false;
|
||||
this._justUp = false;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -1,46 +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}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Resets a Key object back to its default settings.
|
||||
* Optionally resets the keyCode as well.
|
||||
*
|
||||
* @function Phaser.Input.Keyboard.Keys.ResetKey
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Input.Keyboard.Key} key - [description]
|
||||
* @param {boolean} [clearKeyCode=false] - [description]
|
||||
*
|
||||
* @return {Phaser.Input.Keyboard.Key} [description]
|
||||
*/
|
||||
var ResetKey = function (key, clearKeyCode)
|
||||
{
|
||||
if (clearKeyCode === undefined) { clearKeyCode = false; }
|
||||
|
||||
key.preventDefault = false;
|
||||
key.enabled = true;
|
||||
key.isDown = false;
|
||||
key.isUp = true;
|
||||
key.altKey = false;
|
||||
key.ctrlKey = false;
|
||||
key.shiftKey = false;
|
||||
key.timeDown = 0;
|
||||
key.duration = 0;
|
||||
key.timeUp = 0;
|
||||
key.repeats = 0;
|
||||
key._justDown = false;
|
||||
key._justUp = false;
|
||||
|
||||
if (clearKeyCode)
|
||||
{
|
||||
key.keyCode = 0;
|
||||
key.char = '';
|
||||
}
|
||||
|
||||
return key;
|
||||
};
|
||||
|
||||
module.exports = ResetKey;
|
|
@ -38,7 +38,7 @@ var AudioFile = new Class({
|
|||
/**
|
||||
* [description]
|
||||
*
|
||||
* @property {AudioContext} context
|
||||
* @name {AudioContext} context
|
||||
* @since 3.0.0
|
||||
*/
|
||||
this.context = audioContext;
|
||||
|
|
|
@ -915,7 +915,7 @@ var Tilemap = new Class({
|
|||
* on at least one side.
|
||||
* @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that
|
||||
* have at least one interesting face.
|
||||
* @param {LayerData} layer - [description]
|
||||
* @param {LayerData} [layer] - [description]
|
||||
*
|
||||
* @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue