Hi,
I have a question concerning layer-subclassed atlasSprite communication which I think just stems from a lack of experience with obj-C. In my gameLayer I have:
enemySpriteMgr = [AtlasSpriteManager spriteManagerWithFile:@"enemy1_spritesheet_cutout.png" capacity:480];
Enemies1 = [[NSMutableArray alloc] initWithCapacity:kNumberOfEnemies1];
for(int n=0; n<kNumberOfEnemies1; n++){
EnemyType1 *b = [[[EnemyType1 alloc] init] autorelease];
[Enemies1 addObject: b];
[b release];
}
Inside of the EnemyType1 I have initWithRec which requires the atlasSprite manager, but I'm having difficulty referencing the enemySpriteMgr from the gameLayer so I can add the atlasSprite to it. I've previously used code like [(layer*)[self.parent getChildByTag:#]... but this doesn't work as the atlasSprite manager is not the parent until after the atlasSprite is initiated.
I hope this makes sense. If not I can try to clarify. Thank you in advance for your help.
Jonathan0382