What is the best way to create instance of CCSprite from downloaded image file?
I would like to implement downloadable additional contents in my Cocos2D game.
The way I used is
- Create UImage from a downloaded image.
- Create CCTexture2D from UIImage.
- Create CCSprite from CCTexture2D.
If you know more smart way, please let me know.
Have a look at my tutorial How to Download (only) Modified Files from a Webserver. I used this to build a Cocos2D Webcam Viewer and contains example code for downloading files via NSData, saving it to the documents directory and creating a texture/sprite from the downloaded image file.