I have a subclass of CCNode, and I want to have several instances of it, so my layer would send a message to it telling it which sprite to use. in my layer with the game I am using
Code:
CCSprite *babybird = [CCSprite spriteWithFile:@"BabyBird.png"];
BirdNode *bird1 = [BirdNode alloc];
[self addChild:bird1];
[bird1 setupWithBirdType:babybird];
and in my subclass of CCNode I have the method
Code:
-(void)setupWithBirdType:(CCNode *)type
{ NSLog(@"working");
[self addChild:type];
}
The setupWithBirdType method isn't being called, can anybody explain to me why?