mirror of
https://github.com/wassname/phaser.git
synced 2026-07-21 12:40:56 +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
@@ -191,7 +191,7 @@ Object.defineProperty(Phaser.Tile.prototype, "bottom", {
|
||||
* The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.
|
||||
* @method bottom
|
||||
* @return {number}
|
||||
**/
|
||||
*/
|
||||
get: function () {
|
||||
return this.y + this.height;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ Object.defineProperty(Phaser.Tile.prototype, "right", {
|
||||
* However it does affect the width property.
|
||||
* @method right
|
||||
* @return {number}
|
||||
**/
|
||||
*/
|
||||
get: function () {
|
||||
return this.x + this.width;
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ Phaser.TilemapLayer.prototype.getTiles = function (x, y, width, height, collides
|
||||
sx = _tile.width * this.scale.x;
|
||||
sy = _tile.height * this.scale.y;
|
||||
|
||||
if (collides == false || (collides && _tile.collideNone == false))
|
||||
if (collides === false || (collides && _tile.collideNone === false))
|
||||
{
|
||||
// convert tile coordinates back to camera space for return
|
||||
var _wx = this._unfixX( wx*sx ) / tileWidth;
|
||||
|
||||
@@ -34,7 +34,7 @@ Phaser.TilemapParser = {
|
||||
}
|
||||
|
||||
// Zero or smaller than tile sizes?
|
||||
if (width == 0 || height == 0 || width < tileWidth || height < tileHeight || total === 0)
|
||||
if (width === 0 || height === 0 || width < tileWidth || height < tileHeight || total === 0)
|
||||
{
|
||||
console.warn("Phaser.TilemapParser.tileSet: width/height zero or width/height < given tileWidth/tileHeight");
|
||||
return null;
|
||||
@@ -103,7 +103,7 @@ Phaser.TilemapParser = {
|
||||
output[i][c] = parseInt(column[c]);
|
||||
}
|
||||
|
||||
if (width == 0)
|
||||
if (width === 0)
|
||||
{
|
||||
width = column.length;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ Phaser.TilemapParser = {
|
||||
|
||||
for (var t = 0; t < json.layers[i].data.length; t++)
|
||||
{
|
||||
if (c == 0)
|
||||
if (c === 0)
|
||||
{
|
||||
row = [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user