Skip to content

Commit 87633fd

Browse files
committed
Fix multiple types on GameObjects
1 parent 4cff464 commit 87633fd

39 files changed

Lines changed: 171 additions & 171 deletions

src/gameobjects/bitmaptext/GetBitmapTextSize.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
* @function GetBitmapTextSize
1111
* @since 3.0.0
1212
* @private
13-
*
14-
* @param {Phaser.GameObjects.DynamicBitmapText|Phaser.GameObjects.BitmapText} src - [description]
13+
*
14+
* @param {(Phaser.GameObjects.DynamicBitmapText|Phaser.GameObjects.BitmapText)} src - [description]
1515
* @param {boolean} round - [description]
1616
*/
1717
var GetBitmapTextSize = function (src, round)
@@ -23,7 +23,7 @@ var GetBitmapTextSize = function (src, round)
2323
var by = Number.MAX_VALUE;
2424
var bw = 0;
2525
var bh = 0;
26-
26+
2727
var chars = src.fontData.chars;
2828
var lineHeight = src.fontData.lineHeight;
2929

@@ -92,7 +92,7 @@ var GetBitmapTextSize = function (src, round)
9292
{
9393
bw = gw;
9494
}
95-
95+
9696
if (bh < gh)
9797
{
9898
bh = gh;

src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var Render = require('./DynamicBitmapTextRender');
4949
* @param {number} [x=0] - The x coordinate of this Game Object in world space.
5050
* @param {number} [y=0] - The y coordinate of this Game Object in world space.
5151
* @param {string} font - [description]
52-
* @param {string|string[]} [text] - [description]
52+
* @param {(string|string[])} [text] - [description]
5353
* @param {number} [size] - [description]
5454
*/
5555
var DynamicBitmapText = new Class({
@@ -240,7 +240,7 @@ var DynamicBitmapText = new Class({
240240
* @method Phaser.GameObjects.DynamicBitmapText#setText
241241
* @since 3.0.0
242242
*
243-
* @param {string|string[]} value - The string, or array of strings, to be set as the content of this BitmapText.
243+
* @param {(string|string[])} value - The string, or array of strings, to be set as the content of this BitmapText.
244244
*
245245
* @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.
246246
*/

src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ var GameObjectFactory = require('../../GameObjectFactory');
1818
* @param {number} x - The x position of the Game Object.
1919
* @param {number} y - The y position of the Game Object.
2020
* @param {string} font - [description]
21-
* @param {string|string[]} [text] - [description]
21+
* @param {(string|string[])} [text] - [description]
2222
* @param {number} [size] - [description]
23-
*
23+
*
2424
* @return {Phaser.GameObjects.DynamicBitmapText} The Game Object that was created.
2525
*/
2626
GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size)
@@ -29,9 +29,9 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size
2929
});
3030

3131
// When registering a factory function 'this' refers to the GameObjectFactory context.
32-
//
32+
//
3333
// There are several properties available to use:
34-
//
34+
//
3535
// this.scene - a reference to the Scene that owns the GameObjectFactory
3636
// this.displayList - a reference to the Display List the Scene owns
3737
// this.updateList - a reference to the Update List the Scene owns

src/gameobjects/bitmaptext/static/BitmapText.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var Render = require('./BitmapTextRender');
5353
* @param {number} [x=0] - The x coordinate of this Game Object in world space.
5454
* @param {number} [y=0] - The y coordinate of this Game Object in world space.
5555
* @param {string} font - [description]
56-
* @param {string|string[]} [text] - [description]
56+
* @param {(string|string[])} [text] - [description]
5757
* @param {number} [size] - [description]
5858
*/
5959
var BitmapText = new Class({
@@ -160,7 +160,7 @@ var BitmapText = new Class({
160160
* @method Phaser.GameObjects.BitmapText#setText
161161
* @since 3.0.0
162162
*
163-
* @param {string|string[]} value - The string, or array of strings, to be set as the content of this BitmapText.
163+
* @param {(string|string[])} value - The string, or array of strings, to be set as the content of this BitmapText.
164164
*
165165
* @return {Phaser.GameObjects.BitmapText} This Game Object.
166166
*/

src/gameobjects/bitmaptext/static/BitmapTextFactory.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ var GameObjectFactory = require('../../GameObjectFactory');
1818
* @param {number} x - The x position of the Game Object.
1919
* @param {number} y - The y position of the Game Object.
2020
* @param {string} font - [description]
21-
* @param {string|string[]} [text] - [description]
21+
* @param {(string|string[])} [text] - [description]
2222
* @param {number} [size] - [description]
23-
*
23+
*
2424
* @return {Phaser.GameObjects.BitmapText} The Game Object that was created.
2525
*/
2626
GameObjectFactory.register('bitmapText', function (x, y, font, text, size)
@@ -29,9 +29,9 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size)
2929
});
3030

3131
// When registering a factory function 'this' refers to the GameObjectFactory context.
32-
//
32+
//
3333
// There are several properties available to use:
34-
//
34+
//
3535
// this.scene - a reference to the Scene that owns the GameObjectFactory
3636
// this.displayList - a reference to the Display List the Scene owns
3737
// this.updateList - a reference to the Update List the Scene owns

src/gameobjects/blitter/Blitter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var List = require('../../structs/List');
5656
* @param {number} [x=0] - The x coordinate of this Game Object in world space.
5757
* @param {number} [y=0] - The y coordinate of this Game Object in world space.
5858
* @param {string} [texture='__DEFAULT'] - The key of the texture this Game Object will use for rendering. The Texture must already exist in the Texture Manager.
59-
* @param {string|integer} [frame=0] - The Frame of the Texture that this Game Object will use. Only set if the Texture has multiple frames, such as a Texture Atlas or Sprite Sheet.
59+
* @param {(string|integer)} [frame=0] - The Frame of the Texture that this Game Object will use. Only set if the Texture has multiple frames, such as a Texture Atlas or Sprite Sheet.
6060
*/
6161
var Blitter = new Class({
6262

@@ -116,7 +116,7 @@ var Blitter = new Class({
116116
*
117117
* @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object.
118118
* @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.
119-
* @param {string|integer|Phaser.Textures.Frame} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.
119+
* @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.
120120
* @param {boolean} [visible=true] - Should the created Bob render or not?
121121
* @param {integer} [index] - The position in the Blitters Display List to add the new Bob at. Defaults to the top of the list.
122122
*

src/gameobjects/blitter/BlitterFactory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var GameObjectFactory = require('../GameObjectFactory');
1818
* @param {number} x - The x position of the Game Object.
1919
* @param {number} y - The y position of the Game Object.
2020
* @param {string} key - The key of the Texture the Blitter object will use.
21-
* @param {string|integer} [frame] - The default Frame children of the Blitter will use.
21+
* @param {(string|integer)} [frame] - The default Frame children of the Blitter will use.
2222
*
2323
* @return {Phaser.GameObjects.Blitter} The Game Object that was created.
2424
*/

src/gameobjects/blitter/Bob.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var Class = require('../../utils/Class');
3030
* @param {Phaser.GameObjects.Blitter} blitter - The parent Blitter object is responsible for updating this Bob.
3131
* @param {number} x - The horizontal position of this Game Object in the world, relative to the parent Blitter position.
3232
* @param {number} y - The vertical position of this Game Object in the world, relative to the parent Blitter position.
33-
* @param {string|integer} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using.
33+
* @param {(string|integer)} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using.
3434
* @param {boolean} visible - Should the Bob render visible or not to start with?
3535
*/
3636
var Bob = new Class({
@@ -70,7 +70,7 @@ var Bob = new Class({
7070
* [description]
7171
*
7272
* @name Phaser.GameObjects.Blitter.Bob#frame
73-
* @type {string|integer}
73+
* @type {(string|integer)}
7474
* @since 3.0.0
7575
*/
7676
this.frame = frame;

src/gameobjects/components/Animation.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ var Animation = new Class({
390390
*
391391
* @param {boolean} [value] - [description]
392392
*
393-
* @return {boolean|Phaser.GameObjects.GameObject} [description]
393+
* @return {(boolean|Phaser.GameObjects.GameObject)} [description]
394394
*/
395395
paused: function (value)
396396
{
@@ -474,7 +474,7 @@ var Animation = new Class({
474474
*
475475
* @param {number} [value] - [description]
476476
*
477-
* @return {number|Phaser.GameObjects.GameObject} [description]
477+
* @return {(number|Phaser.GameObjects.GameObject)} [description]
478478
*/
479479
progress: function (value)
480480
{
@@ -534,7 +534,7 @@ var Animation = new Class({
534534
*
535535
* @param {number} value - [description]
536536
*
537-
* @return {number|Phaser.GameObjects.GameObject} [description]
537+
* @return {(number|Phaser.GameObjects.GameObject)} [description]
538538
*/
539539
repeat: function (value)
540540
{
@@ -562,7 +562,7 @@ var Animation = new Class({
562562
*
563563
* @param {number} [value] - [description]
564564
*
565-
* @return {number|Phaser.GameObjects.GameObject} [description]
565+
* @return {(number|Phaser.GameObjects.GameObject)} [description]
566566
*/
567567
repeatDelay: function (value)
568568
{
@@ -666,7 +666,7 @@ var Animation = new Class({
666666
*
667667
* @param {number} [value] - [description]
668668
*
669-
* @return {number|Phaser.GameObjects.GameObject} [description]
669+
* @return {(number|Phaser.GameObjects.GameObject)} [description]
670670
*/
671671
timeScale: function (value)
672672
{
@@ -779,7 +779,7 @@ var Animation = new Class({
779779
*
780780
* @param {boolean} [value] - [description]
781781
*
782-
* @return {boolean|Phaser.GameObjects.GameObject} [description]
782+
* @return {(boolean|Phaser.GameObjects.GameObject)} [description]
783783
*/
784784
yoyo: function (value)
785785
{

src/gameobjects/components/BlendMode.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var BlendModes = require('../../renderer/BlendModes');
99
/**
1010
* Provides methods used for setting the blend mode of a Game Object.
1111
* Should be applied as a mixin and not used directly.
12-
*
12+
*
1313
* @name Phaser.GameObjects.Components.BlendMode
1414
* @since 3.0.0
1515
*/
@@ -20,11 +20,11 @@ var BlendMode = {
2020

2121
/**
2222
* Sets the Blend Mode being used by this Game Object.
23-
*
23+
*
2424
* This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
25-
*
25+
*
2626
* Under WebGL only the following Blend Modes are available:
27-
*
27+
*
2828
* * ADD
2929
* * MULTIPLY
3030
* * SCREEN
@@ -37,9 +37,9 @@ var BlendMode = {
3737
* on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
3838
* reasons try to be careful about the construction of your Scene and the frequency of which blend modes
3939
* are used.
40-
*
40+
*
4141
* @name Phaser.GameObjects.Components.BlendMode#blendMode
42-
* @type {integer|string}
42+
* @type {(integer|string)}
4343
* @since 3.0.0
4444
*/
4545
blendMode: {
@@ -68,11 +68,11 @@ var BlendMode = {
6868

6969
/**
7070
* Sets the Blend Mode being used by this Game Object.
71-
*
71+
*
7272
* This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
73-
*
73+
*
7474
* Under WebGL only the following Blend Modes are available:
75-
*
75+
*
7676
* * ADD
7777
* * MULTIPLY
7878
* * SCREEN
@@ -85,12 +85,12 @@ var BlendMode = {
8585
* on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
8686
* reasons try to be careful about the construction of your Scene and the frequency of which blend modes
8787
* are used.
88-
*
88+
*
8989
* @method Phaser.GameObjects.Components.BlendMode#setBlendMode
9090
* @since 3.0.0
9191
*
92-
* @param {string|integer} value - The BlendMode value. Either a string or a CONST.
93-
*
92+
* @param {(string|integer)} value - The BlendMode value. Either a string or a CONST.
93+
*
9494
* @return {Phaser.GameObjects.GameObject} This Game Object instance.
9595
*/
9696
setBlendMode: function (value)

0 commit comments

Comments
 (0)