private bool ContainsPlayer(LapHolder val) { return(val == playersCar); }
public void deleteObjectAndInsertAtFirst(LapHolder car) { sortedCars.Remove(car); sortedCars.Insert(0, car); }
// Use this for initialization void Start() { cars = FindObjectsOfType <LapHolder>(); playersCar = FindObjectOfType <CarControllerWheelCollider>().gameObject.GetComponent <LapHolder>(); sortedCars.AddRange(cars); }