我宣布延迟,它给了我一个错误,我试图减慢计时器。类型'GameScene没有成员'延迟'
//Updates Timer
func updateTimer() {
var delay: Int
seconds += 1
self.timerLabel.text = String(self.seconds * 0.01)
timer = NSTimer.scheduledTimerWithTimeInterval(-2.0, target: self, selector: #selector(GameScene.delay), userInfo: nil, repeats: false)
[1]:http://i.stack.imgur.com/oKX8b.png这里是图片 – Bran
请包括错误作为文本在这里,所以即使该图像被删除,该问题仍然有用。 – Robert
我想你错了。首先你的延迟是一个变种,没有一个功能,第二点,在精灵套件中,你应该避免使用NSTimer,除了在等待游戏中的NSNotification –