So this is my code, I don't see anything wrong with this code but I keep getting the following errors...
Use of undeclared type 'TimeInterval'
Metjod does not override any method from it's superclass
Thanks :)
//
// GameScene.swift
// RainCat
//
// Created by Hussain on 07/10/2016.
// Copyright (c) 2016 Hussain. All rights reserved.
//
import SpriteKit
class GameScene: SKScene {
private var lastUpdateTime : TimeInterval = 0
override func sceneDidLoad() {
self.lastUpdateTime = 0
}
override func touchesBegan(_touches: Set<UITouch>, withEvent event: UIEvent?) {
}
override func touchesMoved(_touches: Set<UITouch>, withEvent event: UIEvent?) {
}
override func update(_ currentTime: TimeInterval) {
// Initialize _lastUpdateTime if it has not already been
if (self.lastUpdateTime == 0) {
self.lastUpdateTime = currentTime
}
// Calculate time since last update
let dt = currentTime - self.lastUpdateTime
self.lastUpdateTime = currentTime
}
}