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

Add the animation reverser to the animation sequencer #67

Open
the-simian opened this issue Aug 13, 2019 · 1 comment
Open

Add the animation reverser to the animation sequencer #67

the-simian opened this issue Aug 13, 2019 · 1 comment

Comments

@the-simian
Copy link
Member

  reverseCurrent() {
    return new Promise((resolve, reject) => {
      this.entity.anims.reverse();

      this.entity.once(
        'animationcomplete',
        (animation, frame) => {
          resolve(name);
        },
        this.entity
      );
    });
  }

drop this method in on the next update, it is easy-mode for reversing the animation where it currently is.

@the-simian
Copy link
Member Author

the-simian commented Aug 13, 2019

also

  reverseSequence(name) {
    return new Promise((resolve, reject) => {
      this.entity.anims.playReverse(name, true);
      this.entity.once(
        'animationcomplete',
        (animation, frame) => {
          resolve(name);
        },
        this.entity
      );
    });
  }

this is also chainable now

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

1 participant