Added a warning when the expected image dimensions of the tile set do not match the actual dimensions.

This commit is contained in:
Manuel Giesa 2014-02-07 17:45:46 +01:00
parent e11cae5373
commit 8628c5b2f3

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);
}