override func update(_ currentTime: TimeInterval) {
// Called before each frame is rendered
parallax.update(currentTime)
}
How can i control the update to be done once over a specific period of time
override func update(_ currentTime: TimeInterval) {
// Called before each frame is rendered
parallax.update(currentTime)
}
How can i control the update to be done once over a specific period of time
Your code doesn't add much to your question, so I don't really know if this is what you are looking for, but here is some code to call a function every X time (swift 3):
// call MyMethod every 1 second :
Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(MyController.myMethod), userInfo: nil, repeats: true)
Please search before you post a question -> answer