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