I try to use a few functions in my GameLayer. First - from another class, second - from GameLayer class, but CCSequence run like CCSpawn, not sequence. Separately they both work perfect in GameLayer.
in GameLayer
[self runAction:[CCSequence actions:
[CCCallFuncN actionWithTarget:self.rolypoly selector:@selector(jumpToDeath:)],
[CCCallFuncND actionWithTarget:self selector:@selector(goToGameOverLayer:tagName:)data:(int)TagGameOverLose],
nil]];
in rolypoly class
-(void)jumpToDeath:(id)sender
{
[self.sprite stopAllActions];
id actionSpaw = [CCSpawn actions:
[CCMoveTo actionWithDuration:0.5f position:ccp(self.sprite.position.x, self.sprite.position.y+self.sprite.contentSize.height)],
[CCBlink actionWithDuration:1.0f blinks:4],
nil];
[self.sprite runAction:[CCSequence actions:
[CCCallFuncND actionWithTarget:self selector:@selector(setJumpingToDeath:withValue:)data:(void*)1],
actionSpaw,
[CCHide action],
[CCCallFunc actionWithTarget:self selector:@selector(moveSpriteDeath)],
nil]];
}