Hi
I have a ScoreLayer that inherits from Layer and on ccTouchesBegin I want to close it with an animation. When I do a ScaleBy, everything works fine, but when I do a FadeOut I get an exception.
heres the code :
- (BOOL)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
id fade = [FadeOut actionWithDuration:1.0];
id actionCallFunc = [CallFunc actionWithTarget:self selector:@selector(closeLayer:)];
id actionSequence = [Sequence actions: fade, actionCallFunc, nil];
[self runAction:actionSequence];
return YES;
}
The console says : *** -[ScoreLayer setOpacity:]: unrecognized selector sent to instance 0x3a73f30
and the program halts with objc_ecxeption_thrown
Any idea what is wrong ?