-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Redefined animations and support multiple simultaneous animations #104
Open
GamerGambit
wants to merge
10
commits into
Planimeter:master
Choose a base branch
from
GamerGambit:feature/anim-refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is scheduled for Grid Engine 10 early next year. |
GamerGambit
changed the title
Added spriteAnimation class and redefined animations
Redefined animations and support multiple simultaneous animations
Oct 27, 2020
|
||
-- `#sequence == 2` should be true only for single frame anims. The first sequence should be the frameTime command, second should be frameIndex. | ||
-- This prevents single frame animations from constantly calling `spri:onAnimationEnd`, also single frame animations dont need to loop | ||
if (#self.sequence == 2) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent comment.
I have needed to step away from active development for a while, but this is now pending merge. I'm cleaning upstream up before we add this. Sorry it took two years, @GamerGambit! What a bad two years. |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
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.
This is a breaking PR that changes how sprite animations are defined. The new change removes the previous limitation of a simple
start
andend
frame pair, and replaces it with the ability to use sequential and out-of-order frames, frame ranges, and variable frame times, all in the same animation.An example of the new system might look like this
Single frame animations can be simplified to just
myAnimation = 10
and variable frame times can be achieved by usingframes
here is either a single frame, frame range, or sequence, or combination of those.This PR also enables support for frame events firing multiple event names. For example: