Open LearnCocos2D opened 8 years ago
Would this be a duplicate of #986?
Somewhat. I would only need animation names, not multiple animations per tile.
Ok, but once you name the animations, you can also have multiple of them. If you'd just allow naming and not multiple animations, then I'd rather add names to the tiles. Yet, this can already be done using a custom property.
Note that of course using GIDs is out of the question, and I usually prefer Tiled support libraries to not expose them to the user at all (the Qt based libtiled doesn't either). For identifying tiles without hardcoding tilesets and tile indexes, the preferred mechanism is to use custom tile properties.
Right now, the tile animations can only be accessed by number (GID). For an end-user API it would be much nicer to be able to have a method "playAnimationNamed:atCoord:" because usually the user doesn't have or doesn't want to have to use a GID number that might even change while editing the map/tileset.
No need to check for duplicate names, and name needn't be required, optional attribute suffices.