0
votes

I have a sequence of SKActions setup and they work. However, if I spawn actions within a SKAction runBlock:^{}, those actions run too, but the parent sequence doesn't wait for them to finish. How can I accomplish behavior where, when running a sequence, the parent sequence waits for the actions within a runBlock to complete also?

1
Blocks are meant for asynchronous execution. This will not be possible. - ZeMoon

1 Answers

2
votes

No, this is simply not possible. runBlock fires once and then goes on with the following action. However, you could check in e.g. didFinishUpdate whether some condition is met and then run other actions. But you should not overuse this and rather look whether you can accomplish the desired actions with plain SKActions.