Skip to content

Commit 0eafcc0

Browse files
authored
Merge pull request phaserjs#4119 from nkholski/master
Pick up animation data from Tiled 1.2+
2 parents 8a97491 + 206c12d commit 0eafcc0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/tilemaps/parsers/tiled/ParseTilesets.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ var ParseTilesets = function (json)
7878
tiles[tile.id].objectgroup.objects = parsedObjects2;
7979
}
8080
}
81+
82+
// Copy animation data
83+
if(tile.animation) {
84+
if(tiles.hasOwnProperty(tile.id)){
85+
tiles[tile.id].animation = tile.animation;
86+
}
87+
else {
88+
tiles[tile.id] = { animation: tile.animation };
89+
}
90+
}
8191
}
8292

8393
newSet.tileData = tiles;

0 commit comments

Comments
 (0)