         
         self.addChild(ghost)
 
+    }
+    
+    func didBeginContact(contact: SKPhysicsContact) {
+        
+        
     }
     
     override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {

        ghost.physicsBody = SKPhysicsBody(circleOfRadius: ghost.frame.height/2)
        ghost.physicsBody?.categoryBitMask = PhysicsCatagory.Ghost
        ghost.physicsBody?.collisionBitMask = PhysicsCatagory.Ground | PhysicsCatagory.Wall
        ghost.physicsBody?.contactTestBitMask = PhysicsCatagory.Ground | PhysicsCatagory.Wall
        ghost.physicsBody?.dynamic = true
        ghost.physicsBody?.affectedByGravity = false
        

import SpriteKit

struct PhysicsCatagory {
    static let Ghost    : UInt32 = 0x1 << 1
    static let Ground   : UInt32 = 0x1 << 2
    static let Wall     : UInt32 = 0x1 << 3
    static let Score    : UInt32 = 0x1 << 4
}


class GameScene: SKScene, SKPhysicsContactDelegate{
    
    var ground = SKSpriteNode()
    var ghost = SKSpriteNode()
