I tried storing some CCSprites in a NSMutableArray, but the game crashed immediately, I'm guessing it's a memory problem, and I'm also guessing that CCSprites are autorelease objects?
So, how would I store multiple CCSprites in a NSMutableArray?
The purpose I wanna do this is store for example all enemies in an array, and then loop through them in my timestep function and update their positions and whatnot.
What I tried to do:
NSMutableArray *enemies = [NSMutableArray array];
[enemies addObject: [CCSprite spriteWithFile: @"hello.png"]];
It crashes when I try to reach the sprite using -objectAtIndex: