if ([contact.bodyA.node.name isEqualToString:@"growCoins"] || [contact.bodyB.node.name isEqualToString:@"growCoins"]) {
[hero grow];
self.immune = YES;
[self immuned];
immunitytobeFading = [NSTimer timerWithTimeInterval:7 target:self selector:@selector(immunityFading) userInfo:nil repeats:NO];
////
NSTimer *immunityFades;
immunityFades = [NSTimer timerWithTimeInterval:3 target:self selector:@selector(immunityFaded) userInfo:nil repeats:NO];
////
}
//BELOW IS NOT GETTING CALLED
-(void)immunityFaded
{
self.immune = NO;
NSLog(@"no longer immune");
}
//BELOW IS GETTING CALLED FINE
-(void)immunityFading
{
...
[self addChild:plusone];
[self animateWithPusleFading:plusone];
}
Can anyone think of a reason why the 2nd NSTimer isn't being called?
I've put a break in the IF statement on the NStimer and it breaks, but when i put the Break on the -(void)immunityFaded
it doesn't at all?