Browse Subversion Repository
Diff of /trunk/jgame.js
Parent Directory
| Revision Log
| Patch
| 2167 |
this.height = this.tileHeight * height; |
this.height = this.tileHeight * height; |
| 2168 |
}; |
}; |
| 2169 |
|
|
| 2170 |
Tile.prototype.clear = function (width, height) { |
Tile.prototype.clear = function (width, height, value) { |
| 2171 |
if (!width) |
if (!width) |
| 2172 |
width = this.size.width; |
width = this.size.width; |
| 2173 |
if (!height) |
if (!height) |
| 2174 |
height = this.size.height; |
height = this.size.height; |
| 2175 |
|
if (value === undefined) |
| 2176 |
|
value = -1; |
| 2177 |
this._clear(width, height); |
this._clear(width, height); |
| 2178 |
this.data = []; |
this.data = []; |
| 2179 |
for (var x = 0; x < width; x++) { |
for (var x = 0; x < width; x++) { |
| 2180 |
this.data[x] = []; |
this.data[x] = []; |
| 2181 |
for (var y = 0; y < height; y++) |
for (var y = 0; y < height; y++) |
| 2182 |
this.data[x][y] = -1; |
this.data[x][y] = value; |
| 2183 |
} |
} |
| 2184 |
this.refresh(); |
this.refresh(); |
| 2185 |
}; |
}; |
|
|
Legend:
| Removed from v.149 |
|
| changed lines |
| |
Added in v.150 |
|
|
|