mirror of
https://github.com/wassname/phaser.git
synced 2026-07-18 12:30:44 +08:00
Updating all files to adhere to the JSHint settings and fixing lots of documentation errors on the way.
This commit is contained in:
+2
-2
@@ -588,7 +588,7 @@ Phaser.Cache.prototype = {
|
||||
*/
|
||||
getFrame: function (key) {
|
||||
|
||||
if (this._images[key] && this._images[key].spriteSheet == false)
|
||||
if (this._images[key] && this._images[key].spriteSheet === false)
|
||||
{
|
||||
return this._images[key].frame;
|
||||
}
|
||||
@@ -692,7 +692,7 @@ Phaser.Cache.prototype = {
|
||||
*/
|
||||
isSoundReady: function (key) {
|
||||
|
||||
return (this._sounds[key] && this._sounds[key].decoded && this.game.sound.touchLocked == false);
|
||||
return (this._sounds[key] && this._sounds[key].decoded && this.game.sound.touchLocked === false);
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ Phaser.Loader.prototype = {
|
||||
|
||||
this.preloadSprite = { sprite: sprite, direction: direction, width: sprite.width, height: sprite.height, crop: null };
|
||||
|
||||
if (direction == 0)
|
||||
if (direction === 0)
|
||||
{
|
||||
// Horizontal crop
|
||||
this.preloadSprite.crop = new Phaser.Rectangle(0, 0, 1, sprite.height);
|
||||
@@ -247,7 +247,7 @@ Phaser.Loader.prototype = {
|
||||
|
||||
if (typeof overwrite === "undefined") { overwrite = false; }
|
||||
|
||||
if (overwrite || this.checkKeyExists(key) == false)
|
||||
if (overwrite || this.checkKeyExists(key) === false)
|
||||
{
|
||||
this.addToFileList('image', key, url);
|
||||
}
|
||||
@@ -268,7 +268,7 @@ Phaser.Loader.prototype = {
|
||||
|
||||
if (typeof overwrite === "undefined") { overwrite = false; }
|
||||
|
||||
if (overwrite || this.checkKeyExists(key) == false)
|
||||
if (overwrite || this.checkKeyExists(key) === false)
|
||||
{
|
||||
this.addToFileList('text', key, url);
|
||||
}
|
||||
@@ -1085,7 +1085,7 @@ Phaser.Loader.prototype = {
|
||||
|
||||
if (this.preloadSprite !== null)
|
||||
{
|
||||
if (this.preloadSprite.direction == 0)
|
||||
if (this.preloadSprite.direction === 0)
|
||||
{
|
||||
this.preloadSprite.crop.width = Math.floor((this.preloadSprite.width / 100) * this.progress);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user