Howdy,
I've looked at the code over and over and I'm not seeing how AtlasAnimation knows what sprite manager to reference. I'm assuming I have a fundamental misunderstanding of how things are supposed to work. This code was taken from another post [ thanks lolcoder ;) ]
// create the player
asMan = [AtlasSpriteManager spriteManagerWithFile:@"dude.png"];
aSprite = [AtlasSprite spriteWithRect:CGRectMake(0, 0, 17, 29) spriteManager:asMan];
[asMan addChild:aSprite z:0];
[aSprite setPosition:cpv(240, 200)];
// create the running animation
runAnimation = [AtlasAnimation animationWithName:@"run" delay:0.2f];
[runAnimation addFrameWithRect: CGRectMake(17, 0, 17, 29) ];
[runAnimation addFrameWithRect: CGRectMake(34, 0, 17, 29) ];
[aSprite addAnimation:runAnimation];
So in the addFrameWithRect methods, how does it know what texture to use those coordinates on?
thanks in advance