[/php]
class GameScene: SKScene {
override func didMoveToView(view: SKView) {
var timer = NSTimer()
  timer = NSTimer.scheduledTimerWithTimeInterval(1, target:self,
selector: Selector(“updateCounter”), userInfo: nil, repeats: true)
 }
func updateCounter() {
print(“get it”)
}

}
[/php]
call function every 1 second

By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is www.looptek.com

Leave a Reply