How to quickly stop updating a sprite set?
1 answer
You can use bool
to do this, for example, when your game just does it true
and put an if condition in your update method, for example:
override func update(currentTime: NSTimeInterval) {
// It will execute till gameOver is false but when you make your gameOver true then it will not execute.
if !gameOver {
//Do your stuff
}
}
Hope this helps you.
+3
source to share