Skip to content

Instantly share code, notes, and snippets.

@jjacobson93
Created March 17, 2017 07:24
Show Gist options
  • Save jjacobson93/79d877555bc6f9d6ebb39f96e7b465e7 to your computer and use it in GitHub Desktop.
Save jjacobson93/79d877555bc6f9d6ebb39f96e7b465e7 to your computer and use it in GitHub Desktop.
Repeat SKAction
let moveAction = SKAction.moveBy(x: 10, y: -15, duration: 0.8)
let player = SKSpriteNode(imageNamed: "player.png")
let moveFiveTimes = SKAction.repeat(moveAction, count: 5)
player.run(moveFiveTimes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment