             gameIsPaused ? pause() : unPause()
         }
     }
+    var CountdownText:SKLabelNode!
+    
+    var timerNum: Int = 10
+    var countDownTimer = Timer()
     
     //MARK - collision -
     override func didMove(to view: SKView) {
+        
         firstUnPause = true
         self.physicsWorld.gravity = CGVector.zero
         //physicsBody!.categoryBitMask = PhysicsCategory.Edge
         physicsWorld.contactDelegate = self
-
+        
+        self.countDownTimer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(GameScene.updateTimer), userInfo: nil, repeats: true)
+        
+        CountdownText = SKLabelNode(text: "\(timerNum)")
+        CountdownText.fontSize = 100
+        CountdownText.position.x = 0
+        CountdownText.position.y = 350
+        CountdownText.zPosition = 10000
+        CountdownText.fontName = "Hobo Std"
+        CountdownText.alpha = 0.5
+        
+        addChild(CountdownText)
+        
 
         exitNode = childNode(withName: "exit") as! ExitNode
         playerNode = childNode(withName:"mainball") as! PlayerNode

        view!.presentScene(scene)
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        if(gameIsPaused){
            gameIsPaused = false

        
        let music = SKAudioNode(fileNamed: "bgMusic.wav")
        addChild(music)
        
        //time.fire()
        //print(self.playerNode.physicsBody?.categoryBitMask)
        //print(self.exitNode.physicsBody?.categoryBitMask)
        //print(self.jumpNode?.physicsBody?.categoryBitMask)
