     
     override func viewDidLoad() {
         super.viewDidLoad()
-        
-//        AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
         
         let gunFireFile = NSBundle.mainBundle().URLForResource("fire", withExtension: "mp3")
         do {

                    let pin = EnemyPin(coordinate: CLLocationCoordinate2D(latitude: enemy.latitude, longitude: enemy.longitude))
                    self.mapView.addAnnotation(pin)
                }
                
                for enemy in self.enemies {
                    let angle = self.angleTo(self.userLatitude, lon1: self.userLongitude, lat2: enemy.latitude, lon2: enemy.longitude)
                    
                    //            if newHeading.magneticHeading > (angle - halfCone) && newHeading.magneticHeading < (angle + halfCone) && withinRange(enemy.latitude, lon1: enemy.longitude, lat2: userLatitude, lon2: userLongitude) {
                    print(angle)
                }
            }
            
            task.resume()
        }
        
//        self.locationManager.stopUpdatingLocation() // Stop updating the location so we can zoom around the map
    }
    
    func locationManager(manager: CLLocationManager, didUpdateHeading newHeading: CLHeading) {
        for enemy in enemies {
            let halfCone = 2.0
//            let angle = angleTo(enemy.latitude, lon1: enemy.longitude, lat2: userLatitude, lon2: userLongitude)
            
//            if newHeading.magneticHeading > (angle - halfCone) && newHeading.magneticHeading < (angle + halfCone) && withinRange(enemy.latitude, lon1: enemy.longitude, lat2: userLatitude, lon2: userLongitude) {
//                print(angle)
//                print((angle - halfCone), newHeading.magneticHeading, (angle + halfCone), withinRange(enemy.latitude, lon1: enemy.longitude, lat2: userLatitude, lon2: userLongitude))
                AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
//                print("Aimed", newHeading.magneticHeading, angle, enemy.latitude, enemy.longitude)
//            }
        }
        
//        print(newHeading.magneticHeading)
    }
    
    func locationManager(manager: CLLocationManager, didFailWithError error: NSError) {

    }
    
    func angleTo(lat1: Float64, lon1: Float64, lat2: Float64, lon2: Float64) -> Float64 {
        var angle = toDegrees(atan2(sin(toRadians(lon2-lon1))*cos(toRadians(lat2)), cos(toRadians(lat1))*sin(toRadians(lat2))-sin(toRadians(lat1))*cos(toRadians(lat2))*cos(toRadians(lon2-lon1))))
        
        if angle < 0 {
