mirror of
https://github.com/wassname/phaser.git
synced 2026-06-27 16:10:15 +08:00
Added a warning when the expected image dimensions of the tile set do not match the actual dimensions.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user