|
22 | 22 | */ |
23 | 23 | Phaser.Animation = function (game, parent, name, frameData, frames, frameRate, loop) { |
24 | 24 |
|
25 | | - if (typeof loop === 'undefined') { loop = false; } |
| 25 | + if (loop === undefined) { loop = false; } |
26 | 26 |
|
27 | 27 | /** |
28 | 28 | * @property {Phaser.Game} game - A reference to the currently running Game. |
@@ -246,7 +246,7 @@ Phaser.Animation.prototype = { |
246 | 246 |
|
247 | 247 | var frameIndex; |
248 | 248 |
|
249 | | - if (typeof useLocalFrameIndex === 'undefined') |
| 249 | + if (useLocalFrameIndex === undefined) |
250 | 250 | { |
251 | 251 | useLocalFrameIndex = false; |
252 | 252 | } |
@@ -303,8 +303,8 @@ Phaser.Animation.prototype = { |
303 | 303 | */ |
304 | 304 | stop: function (resetFrame, dispatchComplete) { |
305 | 305 |
|
306 | | - if (typeof resetFrame === 'undefined') { resetFrame = false; } |
307 | | - if (typeof dispatchComplete === 'undefined') { dispatchComplete = false; } |
| 306 | + if (resetFrame === undefined) { resetFrame = false; } |
| 307 | + if (dispatchComplete === undefined) { dispatchComplete = false; } |
308 | 308 |
|
309 | 309 | this.isPlaying = false; |
310 | 310 | this.isFinished = true; |
@@ -445,7 +445,7 @@ Phaser.Animation.prototype = { |
445 | 445 | */ |
446 | 446 | updateCurrentFrame: function (signalUpdate, fromPlay) { |
447 | 447 |
|
448 | | - if (typeof fromPlay === 'undefined') { fromPlay = false; } |
| 448 | + if (fromPlay === undefined) { fromPlay = false; } |
449 | 449 |
|
450 | 450 | if (!this._frameData) |
451 | 451 | { |
@@ -485,7 +485,7 @@ Phaser.Animation.prototype = { |
485 | 485 | */ |
486 | 486 | next: function (quantity) { |
487 | 487 |
|
488 | | - if (typeof quantity === 'undefined') { quantity = 1; } |
| 488 | + if (quantity === undefined) { quantity = 1; } |
489 | 489 |
|
490 | 490 | var frame = this._frameIndex + quantity; |
491 | 491 |
|
@@ -517,7 +517,7 @@ Phaser.Animation.prototype = { |
517 | 517 | */ |
518 | 518 | previous: function (quantity) { |
519 | 519 |
|
520 | | - if (typeof quantity === 'undefined') { quantity = 1; } |
| 520 | + if (quantity === undefined) { quantity = 1; } |
521 | 521 |
|
522 | 522 | var frame = this._frameIndex - quantity; |
523 | 523 |
|
@@ -770,7 +770,7 @@ Object.defineProperty(Phaser.Animation.prototype, 'enableUpdate', { |
770 | 770 | */ |
771 | 771 | Phaser.Animation.generateFrameNames = function (prefix, start, stop, suffix, zeroPad) { |
772 | 772 |
|
773 | | - if (typeof suffix === 'undefined') { suffix = ''; } |
| 773 | + if (suffix === undefined) { suffix = ''; } |
774 | 774 |
|
775 | 775 | var output = []; |
776 | 776 | var frame = ''; |
|
0 commit comments