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

Question: Is there a way to stop all animation #110

Open
sdelaysam opened this issue Nov 18, 2017 · 0 comments
Open

Question: Is there a way to stop all animation #110

sdelaysam opened this issue Nov 18, 2017 · 0 comments

Comments

@sdelaysam
Copy link

sdelaysam commented Nov 18, 2017

Hi, @frankinshtein

When mobile app goes to background, animation stops at some point. When app is restored, animation resumes from exact same time and position.
Is there a way not to stop animation's clock (or reset all tweens as workaround)?
What I want to achieve is to not to keep active animations while app is in background but complete/cancel them.

UPD:
I've added a method to Actor and call it on Stage::onDeactivate.

void Actor::complete()
{
    removeTweens(true);

    spActor child = getFirstChild();
    while (child)
    {
        child->complete();
        child = child->getNextSibling();
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants