I'm new to cocos2d. I've been following a tutorial which I've got working but when I updated the image I used to shoot fireballs by deleting and replacing it from the resources folder, the image no longer renders. What do I have to do when replacing an image?
Before I swapped the images:
CCSprite *projectile = [CCSprite spriteWithFile:@"Projectile.png" rect:CGRectMake(0, 0, 20, 20)];
After swapping images:
CCSprite *projectile = [CCSprite spriteWithFile:@"Fireball.png" rect:CGRectMake(0, 0, 20, 20)];
Do I need to delete the cache somehow and re-add the image?
EDIT:
I added this line below my code and it worked:
[projectile setTexture:[[CCTextureCache sharedTextureCache] addImage:@"Fireball.png"]];
Strange how I have to add a new line of code to replace an image.