adimona
adimona

Reputation: 127

Several runActions one after another?

Is it possible to runAction on different nodes in a sequence style?

Maybe something like:

    [_parentSprite runAction: [SKAction sequence:@[actionOntheParent,
      [_secondSprite runAction: otherActionOnChildMaybe], [_someSprite runAction: actionOnSomeOtherSprite]]];

Upvotes: 2

Views: 66

Answers (1)

ZeMoon
ZeMoon

Reputation: 20274

Definitely, You can nest the actions using the completion block.

[_parentSprite runAction:actionOnTheParent completion:^{
        [_secondSprite runAction:otherActionOnChild completion:^{
            [_someSprite runAction:actionOnSomeOtherSprite];
        }];
    }];

Upvotes: 3

Related Questions