Hi,
Suppose you want to copy a sprite image to another new sprite while using cocos2D. What you do?
See the following code…
Let oldSprite be your first sprite
CCSprite *oldSprite = [CCSprite spriteWithFile:@"ImgOne.png"];
And newSprite be your second sprite
CCSprite *newSprite = [CCSprite spriteWithTexture:[oldSprite texture]];
That’s it! Done! Now newSprite too contain ImgOne as Sprite.
🙂