mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 05:58:30 +00:00
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:
commit
7b572b9b81
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.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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue