mirror of
https://github.com/photonstorm/phaser
synced 2024-12-19 17:44:45 +00:00
Added a warning when the expected image dimensions of the tile set do not match the actual dimensions.
This commit is contained in:
parent
e11cae5373
commit
8628c5b2f3
1 changed files with 4 additions and 0 deletions
|
@ -319,6 +319,10 @@ Phaser.TilemapParser = {
|
||||||
newSet.columns = (set.imagewidth - set.margin) / (set.tilewidth + set.spacing);
|
newSet.columns = (set.imagewidth - set.margin) / (set.tilewidth + set.spacing);
|
||||||
newSet.total = newSet.rows * newSet.columns;
|
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);
|
tilesets.push(newSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue