Closed Pattentrick closed 10 years ago
Player looks fine, but your fix is a bit odd. Doesn't that check only allow the current anim to change if the current anim already exists? Can you try the following instead please:
if (this.currentAnim !== anim) {
this.currentAnim = anim;
if(this.currentAnim) {
this.currentAnim.playFromStart();
}
}
Any better?
Your solution works like a charm. Thanks!
I noticed that you added the fix. Awesome! One question though, what is about the animInit
value i mentioned above:
Is this a typo and it should be this.animInit
instead? Or do i just misunderstand the concept? Sorry to ask again about that. I know that you are very busy at the moment with DUELYST. I don't want to get on your nerves ;-)
Oops you're totally right, it should be this.animInit. I'll change that now, thanks for catching that :-)
You are welcome :D
Hi @collinhover,
When i spawn my player i get an "Uncaught TypeError: Cannot call method 'playFromStart' of undefined" in the console. But everything works fine in Chrome/Firefox, but in IE my player won't show up.
If I add an existence check at this line:
https://github.com/collinhover/impactplusplus/blob/master/lib/plusplus/abstractities/character.js#L2637
javascript
if (this.currentAnim !== anim && this.currentAnim )What do you think about that? And on a site note, i noticed that there is no local variable/parameter with the name
animInit
at theplaceholdAnims
method:https://github.com/collinhover/impactplusplus/blob/master/lib/plusplus/abstractities/character.js#L726
Is this a typo and it should be
this.animInit
instead?