Skip to content

Commit 89a1639

Browse files
author
Christian Wesselhoeft
committed
Fix jshint issues in src/tilemap
1 parent 61f18b6 commit 89a1639

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

src/tilemap/Tilemap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Phaser.Tilemap.prototype = {
177177
* @param {Phaser.Group} [group] - Optional Group to add the layer to. If not specified it will be added to the World group.
178178
* @return {Phaser.TilemapLayer} The TilemapLayer object. This is an extension of Phaser.Image and can be moved around the display list accordingly.
179179
*/
180-
create: function (name, width, height, tileWidth, tileHeight) {
180+
create: function (name, width, height, tileWidth, tileHeight, group) {
181181

182182
if (typeof group === 'undefined') { group = this.game.world; }
183183

@@ -758,7 +758,7 @@ Phaser.Tilemap.prototype = {
758758
}
759759
}
760760

761-
for (var y = 0; y < this.layers[layer].height ; y++)
761+
for (var y = 0; y < this.layers[layer].height; y++)
762762
{
763763
for (var x = 0; x < this.layers[layer].width; x++)
764764
{
@@ -1057,7 +1057,7 @@ Phaser.Tilemap.prototype = {
10571057
this.layers[layer].dirty = true;
10581058

10591059
this.calculateFaces(layer);
1060-
1060+
10611061
return this.layers[layer].data[y][x];
10621062
}
10631063

@@ -1180,7 +1180,7 @@ Phaser.Tilemap.prototype = {
11801180

11811181
this._results.length = 0;
11821182

1183-
this._results.push( { x: x, y: y, width: width, height: height, layer: layer });
1183+
this._results.push({ x: x, y: y, width: width, height: height, layer: layer });
11841184

11851185
for (var ty = y; ty < y + height; ty++)
11861186
{

src/tilemap/TilemapLayer.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ Phaser.TilemapLayer.prototype.postUpdate = function () {
229229
// this.children[i].postUpdate();
230230
// }
231231

232-
}
232+
};
233233

234234
/**
235235
* Sets the world size to match the size of this layer.
@@ -241,7 +241,7 @@ Phaser.TilemapLayer.prototype.resizeWorld = function () {
241241

242242
this.game.world.setBounds(0, 0, this.layer.widthInPixels, this.layer.heightInPixels);
243243

244-
}
244+
};
245245

246246
/**
247247
* Take an x coordinate that doesn't account for scrollFactorX and 'fix' it
@@ -266,7 +266,7 @@ Phaser.TilemapLayer.prototype._fixX = function(x) {
266266

267267
return this._mc.x + (x - (this._mc.x / this.scrollFactorX));
268268

269-
}
269+
};
270270

271271
/**
272272
* Take an x coordinate that _does_ account for scrollFactorX and 'unfix' it
@@ -286,7 +286,7 @@ Phaser.TilemapLayer.prototype._unfixX = function(x) {
286286

287287
return (this._mc.x / this.scrollFactorX) + (x - this._mc.x);
288288

289-
}
289+
};
290290

291291
/**
292292
* Take a y coordinate that doesn't account for scrollFactorY and 'fix' it
@@ -311,7 +311,7 @@ Phaser.TilemapLayer.prototype._fixY = function(y) {
311311

312312
return this._mc.y + (y - (this._mc.y / this.scrollFactorY));
313313

314-
}
314+
};
315315

316316
/**
317317
* Take a y coordinate that _does_ account for scrollFactorY and 'unfix' it
@@ -331,7 +331,7 @@ Phaser.TilemapLayer.prototype._unfixY = function(y) {
331331

332332
return (this._mc.y / this.scrollFactorY) + (y - this._mc.y);
333333

334-
}
334+
};
335335

336336
/**
337337
* Convert a pixel value to a tile coordinate.
@@ -346,7 +346,7 @@ Phaser.TilemapLayer.prototype.getTileX = function (x) {
346346

347347
return this.game.math.snapToFloor(this._fixX(x), this.map.tileWidth) / this.map.tileWidth;
348348

349-
}
349+
};
350350

351351
/**
352352
* Convert a pixel value to a tile coordinate.
@@ -361,7 +361,7 @@ Phaser.TilemapLayer.prototype.getTileY = function (y) {
361361

362362
return this.game.math.snapToFloor(this._fixY(y), this.map.tileHeight) / this.map.tileHeight;
363363

364-
}
364+
};
365365

366366
/**
367367
* Convert a pixel value to a tile coordinate.
@@ -379,7 +379,7 @@ Phaser.TilemapLayer.prototype.getTileXY = function (x, y, point) {
379379

380380
return point;
381381

382-
}
382+
};
383383

384384
/**
385385
* Gets all tiles that intersect with the given line.
@@ -425,7 +425,7 @@ Phaser.TilemapLayer.prototype.getRayCastTiles = function (line, stepRate, collid
425425

426426
return results;
427427

428-
}
428+
};
429429

430430
/**
431431
* Get all tiles that exist within the given area, defined by the top-left corner, width and height. Values given are in pixels, not tiles.
@@ -484,7 +484,7 @@ Phaser.TilemapLayer.prototype.getTiles = function (x, y, width, height, collides
484484

485485
return this._results;
486486

487-
}
487+
};
488488

489489
/**
490490
* Internal function to update maximum values.
@@ -511,7 +511,7 @@ Phaser.TilemapLayer.prototype.updateMax = function () {
511511

512512
this.dirty = true;
513513

514-
}
514+
};
515515

516516
/**
517517
* Renders the tiles to the layer canvas and pushes to the display.
@@ -603,7 +603,7 @@ Phaser.TilemapLayer.prototype.render = function () {
603603

604604
return true;
605605

606-
}
606+
};
607607

608608
/**
609609
* Renders a collision debug overlay on-top of the canvas. Called automatically by render when debug = true.
@@ -673,7 +673,7 @@ Phaser.TilemapLayer.prototype.renderDebug = function () {
673673

674674
}
675675

676-
}
676+
};
677677

678678
/**
679679
* @name Phaser.TilemapLayer#scrollX

src/tilemap/TilemapParser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,4 +454,4 @@ Phaser.TilemapParser = {
454454

455455
}
456456

457-
}
457+
};

0 commit comments

Comments
 (0)