husky mak

Member

Last active 7 months ago

  1. 7 months ago
    Mon Oct 10 22:14:40 2016
    husky mak started the conversation Please could you explain what these errors are..

    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
    }
    }

  2. Mon Oct 10 22:02:04 2016
    husky mak joined the forum.