Jump to content

qertis

Members
  • Posts

    8
  • Joined

  • Last visited

Reputation Activity

  1. Like
    qertis reacted to vox in Using Spriter animations in Cocos2d-JS   
    I'm having issues with this.. I cant create multiple instances of cc.Spriter. For example, if I create a cc.Spriter object give it a entitiy and anim that is OK. As soon as I create another cc.Spriter instance it seems to be that the new cc.Spriter instance is tied to the previous one changing the entity and the anim of the first cc.Spriter object rather than the one one I just created.
     
    Ok I've sort of figured it out.. _hideAllSprites() is hiding sprites from every sprite even from different instances. If i remove hide all sprites I can now see both animations playing.
     
    EDIT(SOLUTION): I changed the class a bit.. I made it so that sprites is now an array inside of the class defined as:
    sprites: [] but you also have to define it in the constructor like:
    ctor:function (sconLink) { this._super(); this.sprites = []; so that it is not a shared array among your instances
     
  2. Like
    qertis reacted to gmalone in Using Spriter animations in Cocos2d-JS   
    That's exciting, qertis.  Good work.  Cocos2d-x-JS needs the Spriter option.  I'm curious, do you develop in CC2DX-JS and use skeletal animation?  If so, in your experience, is that combo ready-for-production use, or still a bit early in dev, i.e. not mature yet?  I'm trying to sort out the options, but sometimes the information is incomplete or out of date.
    Thanks for your work on the Spriter port.
×
×
  • Create New...