2016-02-19 62 views
0

以下代碼將調用start()時的旋轉動畫,並在調用stop()時停止動畫。從SKAction.rotateToAngle()獲取旋轉細節 - SpriteKit

func start(){ 
    let rotate = SKAction.rotateToAngle(CGFloat(M_PI), duration: 10.0) 
    something.runAction(SKAction.sequence([rotate])) 
} 

func stop(){ 
    something.paused = true 
    // or 
    // something.removeAllActions() 
} 

現在,當停止()的動畫時間(例如5秒到在這種情況下操作)中調用,我可以得到的對象有多少在特定時刻旋轉弧度?

我想知道用戶輕敲之間給定spriteNode的旋轉角度。有沒有其他方法可以實現這一目標?

回答