Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tile Animations: allow animations to have a name #1059

Open
LearnCocos2D opened this issue Aug 19, 2015 · 3 comments
Open

Tile Animations: allow animations to have a name #1059

LearnCocos2D opened this issue Aug 19, 2015 · 3 comments
Labels
feature It's a feature, not a bug.

Comments

@LearnCocos2D
Copy link

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.

@bjorn
Copy link
Member

bjorn commented Aug 19, 2015

Would this be a duplicate of #986?

@LearnCocos2D
Copy link
Author

Somewhat. I would only need animation names, not multiple animations per tile.

@bjorn
Copy link
Member

bjorn commented Aug 20, 2015

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.

@bjorn bjorn added the feature It's a feature, not a bug. label Aug 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug.
Projects
None yet
Development

No branches or pull requests

2 participants