dimanche 31 mai 2015

Swap background image multiple times in Cocos2d-x

I am making a story-based 2D game using Cocos2d-x, and I need to switch the background sprite, which is a sprite the is taking the entire resolution of the frame, multiple times during the game. How can I do this ??

I think I should load all the background images to a texture cache of some sort at the beginning and then just swap them, but I don't really know how to do that.

I'd really appreciate some code snippets for Cocos2d-x 3.6.

Aucun commentaire:

Enregistrer un commentaire