void SnapPhoto() { float total = 0f; foreach (GameObject obj in pointsOfInterest) { PointOfInterest poi = obj.GetComponent <PointOfInterest>(); total += poi.CalculateValue(); } scoring.score += (int)total; }