I want to keep a track of how many points have been scored overall in game over as many games as the person plays. For example, if a person plays the game 25 times and scores 100 each time then their total score would be 2500. This is the method I am using to increment the score in the game:
let waitScore = SKAction.waitForDuration(1.0) //add score every second
let incrementScore = SKAction.runBlock ({
++self.score
self.scoreLabel.text = "\(self.score)"}) //update score label with score
self.runAction(SKAction.repeatActionForever(SKAction.sequence([waitScore,incrementScore])))
The total score will be displayed in a different scene, so I guess I need to save the total score using NSUser defaults, load it in the game scene where the score is being counted and somehow add the loaded total score to the current score then save the total score?! I hope this makes sense.