Hi everyone,
I am having a real hard time with an error in my game.
After loading all textures I need in my main scene and playing for a while I get the "can't add image: in CCTextureCache" in the middle of my game and textures are not drawn anymore.
If I don't preload the images I get the same error.
How can CCTextureCache miss an already loaded texture???
Can it be a problem of Memory??? I am not receiving any memory warning in my delegate.
The code where i call the sprites is the following. I do this everytime I need a new Block in my game. Block is a subclass of CCSprite.
In Block.m:
Block *block = [CCSprite spriteWithFile:file];
[self addChild:block];
In MainSceneLayer.m after block collides I draw a new one.
waitBlock = [Block node];
[self addChild:waitBlock];
Can anyone help me please. I have looked everywhere but I don't know how can it be that CCTextureCache don't find a texture.
Is there a limit on CCTextureCache??? I make a cleanup after every Block that disappears from game also.
Thank you for the help!!!