mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 17:58:23 +00:00
fix PutTileAt tile size with releated tileset width and height, releated bug #5647
This commit is contained in:
parent
5c8ecbcf99
commit
f686a9674b
1 changed files with 10 additions and 0 deletions
|
@ -65,6 +65,16 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer)
|
|||
var newTile = layer.data[tileY][tileX];
|
||||
var collides = layer.collideIndexes.indexOf(newTile.index) !== -1;
|
||||
|
||||
// Copy properties from tileset to tiles.
|
||||
var tiles = BuildTilesetIndex(layer.tilemapLayer.tilemap);
|
||||
var index = tile instanceof Tile ? tile.index : tile;
|
||||
|
||||
var sid = tiles[index][2];
|
||||
var set = layer.tilemapLayer.tileset[sid];
|
||||
|
||||
newTile.width = set.tileWidth;
|
||||
newTile.height = set.tileHeight;
|
||||
|
||||
SetTileCollision(newTile, collides);
|
||||
|
||||
// Recalculate faces only if the colliding flag at (tileX, tileY) has changed
|
||||
|
|
Loading…
Reference in a new issue