Skip to content

Commit a759266

Browse files
author
Jeroen Reurings
committed
Changed default values of effect callbacks to null instead of undefined;
Removed @SInCE JSDoc comments for newly added class methods (because it's still unknown in which version they will be added).
1 parent b27130c commit a759266

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/cameras/2d/Camera.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@ var Camera = new Class({
279279
* @name Phaser.Cameras.Scene2D.Camera#_shakeCallback
280280
* @type {function}
281281
* @private
282-
* @default undefined
283-
* @since 3.2.1
282+
* @default null
283+
* @since
284284
*/
285-
this._shakeCallback = undefined;
285+
this._shakeCallback = null;
286286

287287
/**
288288
* [description]
@@ -345,10 +345,10 @@ var Camera = new Class({
345345
* @name Phaser.Cameras.Scene2D.Camera#_fadeCallback
346346
* @type {function}
347347
* @private
348-
* @default undefined
349-
* @since 3.2.1
348+
* @default null
349+
* @since
350350
*/
351-
this._fadeCallback = undefined;
351+
this._fadeCallback = null;
352352

353353
/**
354354
* [description]
@@ -411,10 +411,10 @@ var Camera = new Class({
411411
* @name Phaser.Cameras.Scene2D.Camera#_flashCallback
412412
* @type {function}
413413
* @private
414-
* @default undefined
415-
* @since 3.2.1
414+
* @default null
415+
* @since
416416
*/
417-
this._flashCallback = undefined;
417+
this._flashCallback = null;
418418

419419
/**
420420
* [description]
@@ -719,7 +719,7 @@ var Camera = new Class({
719719
this._fadeRed = red;
720720
this._fadeGreen = green;
721721
this._fadeBlue = blue;
722-
this._fadeCallback = callback;
722+
this._fadeCallback = callback || null;
723723

724724
if (duration <= 0)
725725
{
@@ -761,7 +761,7 @@ var Camera = new Class({
761761
this._flashRed = red;
762762
this._flashGreen = green;
763763
this._flashBlue = blue;
764-
this._flashCallback = callback;
764+
this._flashCallback = callback || null;
765765

766766
if (duration <= 0)
767767
{
@@ -800,7 +800,7 @@ var Camera = new Class({
800800
this._shakeIntensity = intensity;
801801
this._shakeOffsetX = 0;
802802
this._shakeOffsetY = 0;
803-
this._shakeCallback = callback;
803+
this._shakeCallback = callback || null;
804804

805805
return this;
806806
},
@@ -1335,10 +1335,10 @@ var Camera = new Class({
13351335
{
13361336
this._flashAlpha = 0.0;
13371337
}
1338-
if (this._flashCallback !== undefined && this._flashAlpha === 0.0)
1338+
if (this._flashCallback !== null && this._flashAlpha === 0.0)
13391339
{
13401340
this._flashCallback();
1341-
this._flashCallback = undefined;
1341+
this._flashCallback = null;
13421342
}
13431343
}
13441344

@@ -1350,10 +1350,10 @@ var Camera = new Class({
13501350
{
13511351
this._fadeAlpha = 1.0;
13521352
}
1353-
if (this._fadeCallback !== undefined && this._fadeAlpha === 1.0)
1353+
if (this._fadeCallback !== null && this._fadeAlpha === 1.0)
13541354
{
13551355
this._fadeCallback();
1356-
this._fadeCallback = undefined;
1356+
this._fadeCallback = null;
13571357
}
13581358
}
13591359

@@ -1368,10 +1368,10 @@ var Camera = new Class({
13681368
this._shakeOffsetX = 0.0;
13691369
this._shakeOffsetY = 0.0;
13701370

1371-
if (this._shakeCallback !== undefined)
1371+
if (this._shakeCallback !== null)
13721372
{
13731373
this._shakeCallback();
1374-
this._shakeCallback = undefined;
1374+
this._shakeCallback = null;
13751375
}
13761376
}
13771377
else

0 commit comments

Comments
 (0)