Running an a single action on multiple sprites at the same time
- by Stephen
Ok so I have created a spiraling animation for a football and I want to be able to run it on 2 sprites at the same time. This is what I have done.
CCAnimation* footballAnim = [CCAnimation animationWithFrame:@"Football" frameCount:60 delay:0.005f];
spiral = [CCAnimate actionWithAnimation:footballAnim];
CCRepeatForever* repeat = [CCRepeatForever actionWithAction:spiral];
[Sprite1 runAction: repeat];
[Sprite2 runAction: repeat];
but it only runs the action on the first sprite. What am I doing wrong?