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

[SOLVED]there maybe a bug about setAnimationByName() #23

Closed
zk-luke opened this issue Oct 3, 2016 · 2 comments
Closed

[SOLVED]there maybe a bug about setAnimationByName() #23

zk-luke opened this issue Oct 3, 2016 · 2 comments

Comments

@zk-luke
Copy link

zk-luke commented Oct 3, 2016

I have 5 animations made with spine 3.x . when i use setAniamtion() to change animation ,it doesnt work.
if i invoke setMixByName(a,b) and a and b can change,but others still cannot change.

hope to replay. thks man.

please watch the demo here ,click to change animaitons.

repo is here

post:
I am not sure , there minght be some different about spine2.x and 3.x at animations section in json files.

@AleBles
Copy link
Member

AleBles commented Oct 3, 2016

You need to call setToSetupPose after switching the animation

            game.input.onDown.add(function() {
              count++;
              count = count % shit.length;
              symbols.setAnimationByName(0, shit[count], true);
              symbols.setToSetupPose();
              console.log("play", shit[count]);
            });

@zk-luke
Copy link
Author

zk-luke commented Oct 5, 2016

thanks man, it works fine!

@zk-luke zk-luke closed this as completed Oct 5, 2016
@zk-luke zk-luke changed the title there maybe a bug about setAnimationByName() [SOLVED]there maybe a bug about setAnimationByName() Oct 5, 2016
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