If this is the only action performed on node, you can verify this using:
if (!lionNode.hasActions) { // check if no actions are running on this node
// action code here
}
Alternatively, you can set a boolean value in the completion block, which is called after the start and end of the action:
[lionNode runAction:[SKAction sequence: @[lionJumpActionUp, lionJumpActionFly, lionJumpActionDown, lionJumpActionPause]] completion:^{
BOOL isActionCompleted = YES;
}];
source
share