Skip to content

Instantly share code, notes, and snippets.

@jjacobson93
Created March 20, 2017 23:32
Show Gist options
  • Save jjacobson93/d086e2b343961279e9989fb1a73f3e02 to your computer and use it in GitHub Desktop.
Save jjacobson93/d086e2b343961279e9989fb1a73f3e02 to your computer and use it in GitHub Desktop.
Run block SKAction
let coin = SKSpriteNode(imageNamed: "coin.png")
let animate = SKAction.rotate(byAngle: π/2, duration: 0.75)
let updateScore = SKAction.run {
scoreValue += 10
}
let sequence = SKAction.sequence([animate, updateScore])
coin.run(sequence)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment