2
在我的游戏中,我有一个运行无尽动画的SpriteNode;用户可以通过点击一个按钮来停止动画(简历);我需要知道动画的当前帧,所以我可以读取与其相关的适当值(来自XML文件)。当前动画帧 - SKSpriteNode
这里是我的代码:
SKAction *animateCircle = [SKAction
animateWithTextures:_animationTextures
timePerFrame: [self getAnimationSpeedAccordingToStage]];
SKAction *repeatAnimation = [SKAction repeatActionForever:animateCircle];
[shapeNode runAction:repeatAnimation withKey:@"shapeAnimation"];
animationStartTime = [NSDate date];
[self resumeShapeAnimation];
可能重复http://stackoverflow.com/questions/21698512/sktexture-get-图像名称) – jackslash