In my game I have a SpriteNode running an endless animation; the user can stop the animation by hitting a button (resume as well); I need to know the current frame of the animation, so I can read the proper value associated with it (from an XML file).
Here is my code:
SKAction *animateCircle = [SKAction
animateWithTextures:_animationTextures
timePerFrame: [self getAnimationSpeedAccordingToStage]];
SKAction *repeatAnimation = [SKAction repeatActionForever:animateCircle];
[shapeNode runAction:repeatAnimation withKey:@"shapeAnimation"];
animationStartTime = [NSDate date];
[self resumeShapeAnimation];