I'm working on a game using Sprite Kit where the user needs to solve as many puzzles in a given period of time. Every time a puzzle is solved correctly, a new game scene is created with a new puzzle and displayed. I created a timer for the scenes, but it restarts every time a new scene is generated. Is there a way to keep one timer displayed for multiple scenes?
1
votes
3 Answers
1
votes
You should use a singleton file to store this so it will be the only one when you change the scene or anything.
http://www.raywenderlich.com/46988/ios-design-patterns This link will give you the basic knowledge about how to work with Singleton like that.
1
votes