Remove dubious use of tile.index to reference the tilesets list (it seems unlikely that there would ever be a tilesets value for every tile, and a huge waste of memory if it was ever done that way).

TODO: look into putting the tileset index (or a tileset reference) into each Tile structure when building them to avoid resolveTilesets entirely too.
This commit is contained in:
Pete Baron 2016-06-14 00:43:46 +12:00
parent 7533005a62
commit 11c5300591

View file

@ -732,12 +732,7 @@ Phaser.TilemapLayerGL.prototype.renderRegion = function (scrollX, scrollY, left,
var index = tile.index;
var set = tilesets[index];
if (set === undefined)
{
set = this.resolveTileset(index);
}
var set = this.resolveTileset(index);
if (tile.alpha !== lastAlpha && !this.debug)
{