Manesh
Manesh

Reputation: 528

If SKAction Repeat Action Count Ends

I have a ground object being repeated 23 times:

var moveGroundSpritesForever = SKAction.repeatAction(SKAction.sequence([moveGroundSprite]), count: 23)

How can I create an if statement in swift for when this count finishes to perform another action? Thanks

Upvotes: 1

Views: 813

Answers (1)

Yaman
Yaman

Reputation: 3991

Use func runAction(action: SKAction!, completion block: (() -> Void)!). completion closure will trigger when all your repeated actions are executed

Upvotes: 1

Related Questions