Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by MarkJohnson

Because I have sprites in differing sizes for the same entity, I broke them up into two separate sheets. So when my entity has one gun out, I wan&039;t it to use sprite sheet 1, and when it has the next gun out, to use sprite sheet 2. I tried to, in my update method to, if the entity changed guns #this.animSheet = new ig.AnimationSheet('media/charSprRockets.png', 83, 106); But this did not work, it continues using the sprite sheet I specified in the beginning of the class. Please tell me how to use multiple sprite sheets for one entity and how to switch back and forth between them.
Thanks,
Mark Johnson

1 decade ago by alexandre

You have to create an animation with this.addAnim(...) after you have changed your animSheet property. Otherwise your entity's currentAnim will remain the same as before. Hope this helps.
Page 1 of 1
« first « previous next › last »