Merge pull request #377 from Malax/dev

Added a warning when the tile set image has not the expected dimensions.
This commit is contained in:
Richard Davey 2014-02-21 16:58:06 +00:00
commit 7b572b9b81

View file

@ -319,6 +319,10 @@ Phaser.TilemapParser = {
newSet.columns = (set.imagewidth - set.margin) / (set.tilewidth + set.spacing);
newSet.total = newSet.rows * newSet.columns;
if (newSet.rows % 1 !== 0 || newSet.columns % 1 !== 0) {
console.warn('TileSet image dimensions do not match expected dimensions.');
}
tilesets.push(newSet);
}