Allow sprite animations to continue each other #1558
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1462
Added family-name property to sprites.
Family names are a way for the game to identify sprites that continue each other; when switching between actions with the same family name, animations won't reset.
Technical details
Add an optional property called "family-name" for all sprite actions. For a given sprite, switching between actions with the same family name will remember "progress" in the animation. This will prevent resetting the animation, for example, when flipped.
If the property is absent, the game will assign family names automatically based on links created by the mirror_action and clone_action properties. That means if you have an action, plus another action which is a mirror of the first one, plus another which is a clone of either the first or the second, they will all share the same family name.
Result: