What is the better approach:
For example if I want to add a node to the scene and play some animation, or run some other code which I want to execute right after the node is added to the scene, but not before, what is a preferred thing to do:
This:
[scene addItem:item];
[item playAnimation];
[item runSomeTimeRelatedCode];
or to run this same code within action with completion block:
SKAction *action = [SKAction runBlock:^{
[scene addItem:item];
}];
[scene runAction:action completion:^{
[item playAnimation];
[item runSomeTimeRelatedCode];
}];