I made a sprite sheet containing every single sprite in my game and I was wondering If I should initialize the sprite sheet at every scene/layer or have it initialized once when the application loads and have it accessible to every scene or layer.
CCSpriteSheet initialization. How many times?
(3 posts) (2 voices)-
Posted 1 year ago #
-
I think I found the solution. Is it [[CCTextureCache sharedTextureCache] addImage:@"mySpriteSheet.png"] to properly use the sprite sheets?
Posted 1 year ago # -
Unless you create the
CCTexture2Dmanually, the textures will be cached by theCCTextureCacheand they will be stored in the cache until you tell theCCTextureCacheto remove them.Please, the the
CCTextureCacheAPI for further info.Posted 1 year ago #
Reply
You must log in to post.