I'm using CCSequence Actions and I want my sprite to hold at a specific action while touch and hold and continue the sequence once the touch is ended.
-(BOOL) ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{
id downward = [CCRotateTo actionWithDuration:0.1 angle:45];
id straight = [CCRotateTo actionWithDuration:0.1 angle:0];
id stable = [CCSequence actionWithDuration:1.0];
id upward = [CCRotateTo actionWithDuration:0.1 angle:-45];
id Seq = [CCSequence actions:downward, straight, stable, upward, nil];
[mySprite runAction:Seq];
}
-(void) ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event{
}
I want this "id stable = [CCSequence actionWithDuration:1.0];" replaced with a float of time interval while the Touch is on Hold. And reset it when the touch ends.
Any help is much appreciated.