mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
Don't call setTileSize or setSpacing unless values are given
This commit is contained in:
parent
f44b10631d
commit
52085dba91
1 changed files with 10 additions and 2 deletions
|
@ -422,9 +422,17 @@ var Tilemap = new Class({
|
|||
var tileset = this.tilesets[index];
|
||||
|
||||
if (tileset)
|
||||
{
|
||||
if (tileWidth || tileHeight)
|
||||
{
|
||||
tileset.setTileSize(tileWidth, tileHeight);
|
||||
}
|
||||
|
||||
if (tileMargin || tileSpacing)
|
||||
{
|
||||
tileset.setSpacing(tileMargin, tileSpacing);
|
||||
}
|
||||
|
||||
tileset.setImage(texture);
|
||||
|
||||
return tileset;
|
||||
|
|
Loading…
Reference in a new issue