Skip to content

Commit a7df7c2

Browse files
committed
Tidying up linting, notes and comments
1 parent f4a6888 commit a7df7c2

5 files changed

Lines changed: 6 additions & 24 deletions

File tree

v3/src/gameobjects/tilemap/Tile.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ var Components = require('../components');
33

44
var Tile = new Class({
55

6-
// TODO: custom rotation or use transform component
7-
// TODO: Add in bounds mixin, or custom replacement
86
Mixins: [
97
Components.Alpha,
108
Components.Flip,
@@ -37,7 +35,7 @@ var Tile = new Class({
3735
this.collisionCallbackContext = this;
3836
this.scanned = false;
3937

40-
// TODO: update renders to allow for using Components.Tint
38+
// Note: tint is currently a single color value instead of the 4 corner tint component
4139
this.tint = 0xFFFFFF;
4240
},
4341

v3/src/gameobjects/tilemap/Tilemap.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ var Tilemap = new Class({
3838
this.tiles = mapData.tiles;
3939
this.objects = mapData.objects;
4040
this.currentLayerIndex = 0;
41-
42-
// TODO: debugging methods
4341
},
4442

4543
addTilesetImage: function (tilesetName, key, tileWidth, tileHeight, tileMargin, tileSpacing, gid)
@@ -57,8 +55,6 @@ var Tilemap = new Class({
5755

5856
var texture = this.scene.sys.textures.get(key);
5957

60-
// TODO: potentially add in v2 support for bitmap data
61-
6258
var index = this.getTilesetIndex(tilesetName);
6359

6460
if (index === null && this.format === Formats.TILEMAP_TILED_JSON)
@@ -83,8 +79,6 @@ var Tilemap = new Class({
8379
tileset.setImage(texture);
8480
this.tilesets.push(tileset);
8581
return tileset;
86-
87-
// TODO: add in GID & master list of tiles
8882
},
8983

9084
// Creates & selects
@@ -127,8 +121,6 @@ var Tilemap = new Class({
127121
this.layers.push(layerData);
128122
this.currentLayerIndex = this.layers.length - 1;
129123

130-
// TODO: decide about v2 trimming to game width/height
131-
132124
var dynamicLayer = new DynamicTilemapLayer(this.scene, this, this.currentLayerIndex, tileset, x, y);
133125
this.scene.sys.displayList.add(dynamicLayer);
134126

@@ -238,9 +230,6 @@ var Tilemap = new Class({
238230
return null;
239231
}
240232

241-
// TODO: new feature, allow multiple CSV layers
242-
// TODO: display dimension
243-
244233
this.currentLayerIndex = index;
245234

246235
var layer = new StaticTilemapLayer(this.scene, this, index, tileset, x, y);
@@ -266,9 +255,6 @@ var Tilemap = new Class({
266255
return null;
267256
}
268257

269-
// TODO: new feature, allow multiple CSV layers
270-
// TODO: display dimension
271-
272258
this.currentLayerIndex = index;
273259

274260
var layer = new DynamicTilemapLayer(this.scene, this, index, tileset, x, y);

v3/src/gameobjects/tilemap/components/ForEachTile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ var GetTilesWithin = require('./GetTilesWithin');
22

33
/**
44
* For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
5-
* callback.
5+
* callback. Similar to Array.prototype.forEach in vanilla JS.
66
*
77
* @param {number} callback - The callback. Each tile in the given area will be passed to this
88
* callback as the first and only parameter.
9-
* @param {number} context - The context under which the callback should be run.
9+
* @param {number} [context] - The context under which the callback should be run.
1010
* @param {number} [tileX=0] - [description]
1111
* @param {number} [tileY=0] - [description]
1212
* @param {number} [width=max width based on tileX] - [description]
1313
* @param {number} [height=max height based on tileY] - [description]
1414
* @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.
1515
* @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don't have
1616
* -1 for an index.
17-
* @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on
18-
* at least one side.
17+
* @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide
18+
* on at least one side.
1919
* @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that
2020
* have at least one interesting face.
2121
* @param {LayerData} layer - [description]

v3/src/gameobjects/tilemap/components/GetTilesWithin.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
var GetFastValue = require('../../../utils/object/GetFastValue');
42

53
/**

v3/src/gameobjects/tilemap/parsers/parsetiledjson/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ var ParseJSONTiled = function (key, json, insertNull)
139139
y: GetFastValue(curi, 'offsety', 0) + curi.y,
140140
alpha: curi.opacity,
141141
visible: curi.visible,
142-
properties: GetFastValue(curi, "properties", {})
142+
properties: GetFastValue(curi, 'properties', {})
143143
});
144144
}
145145

0 commit comments

Comments
 (0)