How to implement a SpriteKit timer?

前端 未结 2 604
失恋的感觉
失恋的感觉 2021-02-04 09:46

I am currently trying to implement a timer for my sprite kit game, but I don\'t get it working. The initial value of the timer always remains the same.

I am assuming I n

2条回答
  •  天命终不由人
    2021-02-04 10:00

    Sounds like you need to update the label everytime levelTimerValue is changed. The easiest way would be something like this.

    func levelCountdown(){
        levelTimerValue--
        levelTimerLabel.text = String(levelTimerValue)
    }
    

提交回复
热议问题