Cocos2d copied actions not responding?
- by Stephen
I am running an animation on 2 sprites like so:
-(void) startFootballAnimation {
CCAnimation* footballAnim = [CCAnimation animationWithFrame:@"Football" frameCount:60 delay:0.005f];
spiral = [CCAnimate actionWithAnimation:footballAnim];
CCRepeatForever* repeat = [CCRepeatForever actionWithAction:spiral];
[self runAction:repeat];
[secondFootball runAction:[[repeat copy] autorelease]];
}
The problem I am having is I call this method:
- (void) slowAnimation {
[spiral setDuration:[spiral duration] + 0.01];
}
and it only slows down the first sprites animation and not the second one. Do I need to do something different with copied actions to get them to react to the slowing of the animation?