Friday, January 21, 2011

Change Sprite Image

You can Change the image of the sprite very easily. Let your Sprite be "sprite" and image be "myImage.png". I am using Cocos2D Version 0.99.0.

[sprite setTexture:[[CCTextureCache sharedTextureCache] 
addImage:@"myImage.png"]];
It worked for me.

No comments:

Post a Comment