|
Last change
on this file was 28036, checked in by marder, 11 months ago |
|
rmgen: var -> let -> const
One should always use the variable declaration with the least possible scope.
This patch cleans up many (but not all) of the var in rmgen and replaces them with let or const.
The same is done for let -> const.
comments by: @sera @Stan
Differential revision: https://code.wildfiregames.com/D5214
|
-
Property svn:eol-style
set to
native
|
|
File size:
351 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * The TerrainPainter draws a given terrain texture over the given area.
|
|---|
| 3 | * When used with TERRAIN_SEPARATOR, an entity is placed on each tile.
|
|---|
| 4 | */
|
|---|
| 5 | function TerrainPainter(terrain)
|
|---|
| 6 | {
|
|---|
| 7 | this.terrain = createTerrain(terrain);
|
|---|
| 8 | }
|
|---|
| 9 |
|
|---|
| 10 | TerrainPainter.prototype.paint = function(area)
|
|---|
| 11 | {
|
|---|
| 12 | for (const point of area.getPoints())
|
|---|
| 13 | this.terrain.place(point);
|
|---|
| 14 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.