Pause an SKAction in Spritekit with Swift

前端 未结 3 1702
既然无缘
既然无缘 2021-01-02 07:10

I have the following code to move an SKSpriteNode.

let moveDown = SKAction.moveBy(CGVectorMake(0, -120), duration: 1)
let moveUp = SKAction.move         


        
3条回答
  •  甜味超标
    2021-01-02 07:27

    SCNNode.paused has been renamed to SNCNode.isPaused.
    You should be able to do the following Pause animation: square.isPause=true Restart animation: square.isPaused=false

提交回复
热议问题