I would like to use this Core Animation code in Cocos2D, or I just would like to have the same result.How can I translate it to cocos 2D:
CABasicAnimation *pulseAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
pulseAnimation.duration = 1.0;
pulseAnimation.toValue = [NSNumber numberWithFloat:1.1];
pulseAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
pulseAnimation.autoreverses = YES;
pulseAnimation.repeatCount = FLT_MAX;
CALayer *layer = centre.layer;
[layer addAnimation:pulseAnimation forKey:nil];
Thank You. SOrry for my english I’m french :/
this is the code for a single pulse (scale to 110% then back to 100%)
there is
[action setRepeatCount:YOUR_COUNT];but I haven’t tried that myself.