I have an object that inherited from CCSprite. I want from inside this object to change the image.
How do I change the image (sprite) without creating a new CCSprite object in Cocos2d-X?
Thanks, Adrian.
mySprite->setTexture(CCTextureCache::sharedTextureCache()->addImage("newImage.png"));
No need to alter your custom class.. Hope this helps.. :)