In my Game I need to implement a 30 Second timer that starts when I tap on the screen so that if the player hasn't reached the objective before the timer reaches 0 its game over.
I can't figure out how to make the timer Count down to Zero after i touch the screen , it just stays at 30 sec . I tried implementing a NStimer but I'm aware you would have to add a PAUSE feature which i don't want ,plus the NStimer counts down before I touch the screen which i also don't want.
This is my code so far:
var TimerNode: Int = 30
var TimerLabel = SKLabelNode(fontNamed: "STHeitJ-Medium")
TimerLabel.text = "\(TimerNode)"
TimerLabel.fontSize = 40
TimerLabel.position.x = size.width / 2
TimerLabel.position.y = size.height / 8.5
TimerLabel.zPosition = 3.00
TimerLabel.fontColor = UIColor.whiteColor()
addChild(TimerLabel)