Saturday, 25 May 2013

how to re-use a sprite in cocos2d-x

how to re-use a sprite in cocos2d-x

some times it takes time to create the sprite structures in the scene, I might need to setup structures inside this sprite to meet requirement, thus I would hope to reuse such structures with the game again and again.
I tried that, remove the child from parent, detach it from parent , clean parent with the sprite. but when I try to add the sprite to another scene, it's just wont pass the assertion that the sprite already have parent
did I miss some step ?

No comments:

Post a Comment