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

Found bug and fix #23

Open
GoogleCodeExporter opened this issue Aug 25, 2015 · 0 comments
Open

Found bug and fix #23

GoogleCodeExporter opened this issue Aug 25, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Having a timeline inside a timeline, where the parent timeline yoyos causes 
some errors.  Before starting the yoyo repeat, it jumps to end values.

The fix is simple, and you can tell that it was a mistake.  Since the original 
programmer always has two sets of code for when the tween is going forward and 
one for backward, but he did not change the line about the deltas.  They just 
need to be swapped.

Fix by replacing this code in Timeline.java:
if (!isIterationStep && step < lastStep) {
            assert delta <= 0;
            float dt = isReverse(lastStep) ? -delta-1 : delta+1;
            for (int i=children.size()-1; i>=0; i--) children.get(i).update(dt);
            return;
        }
with:
if (!isIterationStep && step < lastStep) {
            assert delta <= 0;
            float dt = isReverse(lastStep) ? delta+1 : -delta-1;
            for (int i=children.size()-1; i>=0; i--) children.get(i).update(dt);
            return;
        }

Original issue reported on code.google.com by berberic...@gmail.com on 2 Jun 2014 at 12:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant