Hi
I have an array of sprites.
I want to do something to each of them.
Let's say I want each sprite to grow and then shrink, but I do not want the whole array to grow and shrink at the same time
I want the first sprite to start growing, then 5 seconds later the next sprite should start growing, 5 seconds later the third should start growing.
As they are all growing, the user can touch them and drag them eventually.
Here is my problem. When I run my code , all sprites start growing at the same time. I do not want this. I do not want them all to grow together (o:
My code is below
Ideas are welcome
I'm having a ton of fun with this, btw
Thanks
Deb
--------------------------
Here I call my function, called growGuy, for each sprite
//Monster Manager, control guy i
monster = [[NSMutableArray alloc] init];
for(int i = 0; i <= 10; i++)
{
Sprite *blueguy = (Sprite *)[self getChildByTag:i];
id action = [CallFuncND actionWithTarget:(self) selector:@selector(growGuy:data:) data:(Sprite*)blueguy];
[blueguy runAction:action];
}
----------------
Here is my function (greatly simplified)
-(void) growGuy: (id)sender data:(Sprite*)blueguy {
NSLog(@"growGuy called ");
id actionGrow = [ScaleBy actionWithDuration:5 scale: 2];
id actionShrink = [ScaleTo actionWithDuration: 0.5 scale:0.5f];
id action = [Sequence actions: [Blink actionWithDuration:2 blinks:5],
[DelayTime actionWithDuration:3], actionGrow,
actionShrink,
nil];
[blueguy runAction:action];
}