     }
 
     func didBeginContact(contact: SKPhysicsContact) {
+        if contact.bodyA.categoryBitMask == ColliderType.Gap.rawValue ||
+           contact.bodyB.categoryBitMask == ColliderType.Gap.rawValue {
+            ++score
+            print(score)
+        }
+
         print("Contact")
 
         gameOver = true

        pipe2.physicsBody?.collisionBitMask      = ColliderType.Object.rawValue

        self.addChild(pipe2)
    }
}

    var pipe1 = SKSpriteNode()
    var pipe2 = SKSpriteNode()

    var score       = 0
    var scoreLabel  = SKLabelNode()

    enum ColliderType : UInt32 {
        case Bird   = 1
        case Object = 2
        case Gap    = 4
    }

    var gameOver = false
